9using System.Collections.Generic;
16 public static class CslaDataPortalConfigurationExtension
21 public static CslaDataPortalConfiguration DataPortal(
this ICslaConfiguration config)
23 return new CslaDataPortalConfiguration();
53 ConfigurationManager.AppSettings[
"CslaDataPortalProxy"] = typeName;
54 ConfigurationManager.AppSettings[
"CslaDataPortalUrl"] = defaultUrl;
66 DataPortalClient.DataPortalProxyFactory.DataPortalTypeProxyDescriptors?.Clear();
68 foreach (var item
in descriptors)
70 if (
int.TryParse(item.Item1, out
int result))
74 new DataPortalClient.DataPortalProxyDescriptor { ProxyTypeName = item.Item2, DataPortalUrl = item.Item3 });
80 var type = Type.GetType(item.Item1);
83 new DataPortalClient.DataPortalProxyDescriptor { ProxyTypeName = item.Item2, DataPortalUrl = item.Item3 });
85 catch (NullReferenceException ex)
87 throw new ArgumentException(item.Item1, ex);
116 ConfigurationManager.AppSettings[
"CslaDataPortalProxyFactory"] = typeName;
136 ConfigurationManager.AppSettings[
"CslaDataPortalActivator"] = typeName;
146 ApplicationContext.DataPortalActivator = activator;
157 ConfigurationManager.AppSettings[
"CslaAuthentication"] = typeName;
179 ConfigurationManager.AppSettings[
"CslaAuthorizationProvider"] = typeName;
192 ConfigurationManager.AppSettings[
"CslaDataPortalInterceptor"] = typeName;
227 ConfigurationManager.AppSettings[
"CslaDataPortalExceptionInspector"] = typeName;
253 ConfigurationManager.AppSettings[
"CslaObjectFactoryLoader"] = typeName;
265 ConfigurationManager.AppSettings[
"CslaAutoCloneOnUpdate"] = value.ToString();
277 ConfigurationManager.AppSettings[
"CslaDataPortalReturnObjectOnException"] = value.ToString();
301 ConfigurationManager.AppSettings[
"CslaDashboardType"] = typeName;
317 ConfigurationManager.AppSettings[
"CslaFlowSynchronizationContext"] = flow.ToString().ToLower();
Use this type to configure the settings for the CSLA .NET data portal.
CslaDataPortalConfiguration ServerAuthorizationProviderType(Type type)
Sets the type name to be used for server-side data portal authorization.
CslaDataPortalConfiguration ActivatorType(string typeName)
Sets the type of the IDataPortalActivator provider.
CslaDataPortalConfiguration ProxyDescriptors(List< Tuple< string, string, string > > descriptors)
Adds resource/type to data portal proxy mappings for use by the data portal.
CslaDataPortalConfiguration FlowSynchronizationContext(bool flow)
Sets a value indicating whether any synchronization context should be flowed to child tasks by LocalP...
CslaDataPortalConfiguration ServerAuthorizationProviderType(string typeName)
Sets the type name to be used for server-side data portal authorization.
CslaDataPortalConfiguration DashboardType(Type type)
Sets the assembly qualified type name of the dashboard, or 'Dashboard' for default,...
CslaDataPortalConfiguration ProxyFactoryType(string typeName)
CslaDataPortalConfiguration AuthenticationType(string typeName)
Sets the authentication type being used by the CSLA .NET framework.
CslaDataPortalConfiguration InterceptorType(Type type)
Sets the type of interceptor invoked by the data portal for pre- and post-processing of each data por...
CslaDataPortalConfiguration InterceptorType(string typeName)
Sets the type of interceptor invoked by the data portal for pre- and post-processing of each data por...
CslaDataPortalConfiguration FactoryLoaderType(string typeName)
Sets the type name of the factor loader used to create server-side instances of business object facto...
CslaDataPortalConfiguration DefaultProxy(string typeName, string defaultUrl)
Configure the default data portal proxy type and URL.
CslaDataPortalConfiguration AutoCloneOnUpdate(bool value)
Sets a value indicating whether objects should be automatically cloned by the data portal Update() me...
CslaDataPortalConfiguration DataPortalReturnObjectOnException(bool value)
Gets or sets a value indicating whether the server-side business object should be returned to the cli...
CslaDataPortalConfiguration ExceptionInspectorType(Type type)
Sets the type of the ExceptionInspector class.
CslaDataPortalConfiguration DashboardType(string typeName)
Sets the assembly qualified type name of the dashboard, or 'Dashboard' for default,...
CslaDataPortalConfiguration FactoryLoaderType(Type type)
Sets the type of the factor loader used to create server-side instances of business object factories ...
CslaDataPortalConfiguration ExceptionInspectorType(string typeName)
Sets the type name of the ExceptionInspector class.
CslaDataPortalConfiguration ProxyFactoryType(Type type)
summary> Sets the full type name (or 'Default') of the data portal proxy factory object to be used to...
CslaDataPortalConfiguration DefaultProxy(Type type, string defaultUrl)
Configure the default data portal proxy type and URL.
CslaDataPortalConfiguration ActivatorType(Type type)
Sets the type of the IDataPortalActivator provider.
CslaDataPortalConfiguration Activator(Server.IDataPortalActivator activator)
Sets an instance of the IDataPortalActivator provider.
Default data portal proxy factory that creates the IDataPortalProxy instance to use for the DataPorta...
static void AddDescriptor(Type objectType, DataPortalProxyDescriptor descriptor)
Add a proxy descriptor for the specified root business type.