CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
DataPortalServerOptions.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DataPortalServerOptions.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Server-side data portal options.</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using Csla.Server;
11
12namespace Csla.Configuration
13{
18 {
23 internal Type DashboardType { get; set; } = typeof(Server.Dashboard.NullDashboard);
24
30 public DataPortalServerOptions RegisterDashboard<T>() where T : Server.Dashboard.IDashboard
31 {
32 DashboardType = typeof(T);
33 return this;
34 }
35
42 internal Type AuthorizerProviderType { get; set; } = typeof(ActiveAuthorizer);
43
50 {
51 AuthorizerProviderType = typeof(T);
52 return this;
53 }
54
60 internal List<Type> InterceptorProviders { get; } = new List<Type>() { typeof(Csla.Server.Interceptors.ServerSide.RevalidatingInterceptor) };
61
67 {
68 InterceptorProviders.Add(typeof(T));
69 return this;
70 }
71
78 {
79 InterceptorProviders.Insert(index, typeof(T));
80 return this;
81 }
82
88 {
89 InterceptorProviders.RemoveAt(index);
90 return this;
91 }
92
96 internal Type ExceptionInspectorType { get; set; } = typeof(DefaultExceptionInspector);
97
103 {
104 ExceptionInspectorType = typeof(T);
105 return this;
106 }
107
111 internal Type ActivatorType { get; set; } = typeof(DefaultDataPortalActivator);
112
118 {
119 ActivatorType = typeof(T);
120 return this;
121 }
122
129 internal Type ObjectFactoryLoaderType { get; set; } = typeof(ObjectFactoryLoader);
130
139 {
140 ObjectFactoryLoaderType = typeof(T);
141 return this;
142 }
143 }
144}
DataPortalServerOptions RemoveInterceptorProvider(int index)
Removes a type of an IInterceptDataPortal.
DataPortalServerOptions RegisterObjectFactoryLoader< T >()
Gets or sets the type name of the factor loader used to create server-side instances of business obje...
DataPortalServerOptions AddInterceptorProvider< T >()
Adds the type of an IInterceptDataPortal that will be executed by the server-side data portal.
DataPortalServerOptions RegisterActivator< T >()
Sets the type of the Activator.
DataPortalServerOptions RegisterExceptionInspector< T >()
Sets the type of the ExceptionInspector.
DataPortalServerOptions RegisterDashboard< T >()
Sets the type of the IDashboard to be used by the data portal.
DataPortalServerOptions RegisterAuthorizerProvider< T >()
Sets the type of the IDataPortalAuthorizer to be used by the data portal.
Implementation of the authorizer that checks per-type authorization rules for each request.
DataPortal interceptor to perform revalidation on business objects
Class containing the default implementation for the FactoryLoader delegate used by the data portal ho...
Interface to be implemented by a custom authorization provider.
Defines a type used to activate concrete business instances.
Implement this interface to check a DataPortalException before returning Exception to the client.
Implement this interface to create a data portal interceptor that is notified each time the data port...
Defines an interface to be implemented by a factory loader object that returns ObjectFactory objects ...