Class DataRegistry
Registry of the data layer.
public static class DataRegistry
- Inheritance
-
DataRegistry
- Inherited Members
Properties
CodeProviders
The list of code providers.
public static DefList<CodeProviderDef> CodeProviders { get; }
Property Value
ConfigProperties
The list of configuration property definitions.
public static DefList<ConfigPropertyDef> ConfigProperties { get; }
Property Value
DocumentHandlers
The list of document handlers
public static DefList<DocumentHandlerDef> DocumentHandlers { get; }
Property Value
Locators
The list of locator definitions.
public static DefList<LocatorDef> Locators { get; }
Property Value
Lookups
The list of lookup sources definitions
public static DefList<LookupDef> Lookups { get; }
Property Value
Modules
The list of module definitions
public static DefList<ModuleDef> Modules { get; }
Property Value
Methods
AddCodeProvider(string)
Adds a definition.
If the definition exists, an exception is thrown.
public static CodeProviderDef AddCodeProvider(string Name)
Parameters
Namestring
Returns
AddConfigProperty(string, string, string, UserLevel, ConfigValueKind, string, string, string, ConfigScopeFlags)
Adds a configuration property definition. If the definition exists, an exception is thrown.
public static ConfigPropertyDef AddConfigProperty(string Name, string TitleKey = null, string GroupName = null, UserLevel SecurityLevel = UserLevel.Admin, ConfigValueKind Kind = ConfigValueKind.String, string DefaultValue = null, string TypeName = null, string EditorClassName = null, ConfigScopeFlags Scopes = ConfigScopeFlags.All)
Parameters
NamestringTitleKeystringGroupNamestringSecurityLevelUserLevelKindConfigValueKindDefaultValuestringTypeNamestringEditorClassNamestringScopesConfigScopeFlags
Returns
AddDocumentHandler(string, string)
Adds a definition.
If the definition exists, an exception is thrown.
public static DocumentHandlerDef AddDocumentHandler(string Name, string ClassName)
Parameters
Returns
AddLocator(string, string, string, string, string, string)
Adds a locator definition.
If the definition exists, an exception is thrown.
public static LocatorDef AddLocator(string Name, string Source = null, string ClassName = null, string KeyField = null, string FormName = null, string WebFormName = null)
Parameters
Returns
AddLookupListModule(string)
A list module with just Id and Name as fields in its table.
NOTE: The name of the module is the list TableName
If the definition exists, an exception is thrown.
public static ModuleDef AddLookupListModule(string Name)
Parameters
Namestring
Returns
AddLookupListModule(string, string)
A list module with just Id and Name as fields in its table.
NOTE: The name of the module is the list TableName
If the definition exists, an exception is thrown.
public static ModuleDef AddLookupListModule(string Name, string TitleKey)
Parameters
Returns
AddLookupListModule(string, string, string)
A list module with just Id and Name as fields in its table.
NOTE: The name of the module is the list TableName
If the definition exists, an exception is thrown.
public static ModuleDef AddLookupListModule(string TableName, string Name, string TitleKey)
Parameters
Returns
AddLookupSource(string, Type, bool)
Adds a lookup source.
If the definition exists, an exception is thrown.
public static LookupDef AddLookupSource(string Name, Type EnumType, bool UseNullItem = false)
Parameters
Returns
AddLookupSource(Type, bool)
Adds a lookup source.
The enum type is used as the source.
If the definition exists, an exception is thrown.
public static LookupDef AddLookupSource(Type EnumType, bool UseNullItem = false)
Parameters
Returns
AddLookupWithClassName(string, string, string, bool)
Adds a lookup source.
If the definition exists, an exception is thrown.
public static LookupDef AddLookupWithClassName(string Name, string ClassName, string FormName = null, bool UseNullItem = false)
Parameters
Returns
AddLookupWithSql(string, string, string, bool)
Adds a lookup source.
If the definition exists, an exception is thrown.
public static LookupDef AddLookupWithSql(string Name, string SqlText = null, string FormName = null, bool UseNullItem = false)
Parameters
Returns
AddLookupWithTableName(string, string, string, bool)
Adds a lookup source.
If the definition exists, an exception is thrown.
public static LookupDef AddLookupWithTableName(string Name, string TableName = null, string FormName = null, bool UseNullItem = false)
Parameters
Returns
AddModule(string, string, string, string, bool, UserLevel)
Adds a definition to the registry.
If the definition exists, an exception is thrown.
public static ModuleDef AddModule(string Name, string TitleKey = null, string ClassName = null, string ListSelectSql = null, bool IsSingleSelect = false, UserLevel SecurityLevel = UserLevel.None)
Parameters
NamestringTitleKeystringClassNamestringListSelectSqlstringIsSingleSelectboolSecurityLevelUserLevel
Returns
AddOrUpdateCodeProvider(string)
Adds or returns a code provider definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static CodeProviderDef AddOrUpdateCodeProvider(string Name)
Parameters
Namestring
Returns
AddOrUpdateConfigProperty(string, string, string, UserLevel?, ConfigValueKind?, string, string, string, ConfigScopeFlags?)
Adds or updates a configuration property definition. NOTE: When the definition already exists, non-null parameters and nullable enum parameters with a value update its scalar properties.
public static ConfigPropertyDef AddOrUpdateConfigProperty(string Name, string TitleKey = null, string GroupName = null, UserLevel? SecurityLevel = null, ConfigValueKind? Kind = null, string DefaultValue = null, string TypeName = null, string EditorClassName = null, ConfigScopeFlags? Scopes = null)
Parameters
NamestringTitleKeystringGroupNamestringSecurityLevelUserLevel?KindConfigValueKind?DefaultValuestringTypeNamestringEditorClassNamestringScopesConfigScopeFlags?
Returns
AddOrUpdateDocumentHandler(string, string)
Adds or updates a document handler definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static DocumentHandlerDef AddOrUpdateDocumentHandler(string Name, string ClassName)
Parameters
Returns
AddOrUpdateLocator(string, string, string, string, string, string)
Adds or updates a locator definition.
Existing field definitions and collections are preserved.
NOTE: When the definition already exists, non-null parameters update its scalar properties. The existing definition instance and its child collections are preserved.
public static LocatorDef AddOrUpdateLocator(string Name, string Source = null, string ClassName = null, string KeyField = null, string FormName = null, string WebFormName = null)
Parameters
Returns
AddOrUpdateLookup(string, Type, string, string, string, string, bool?)
Adds or updates a lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookup(string Name, Type EnumType, string TableName, string SqlText, string ClassName, string FormName, bool? UseNullItem)
Parameters
NamestringEnumTypeTypeTableNamestringSqlTextstringClassNamestringFormNamestringUseNullItembool?
Returns
AddOrUpdateLookupListModule(string, string, string)
Adds or updates a lookup list module definition.
Existing child definitions and collections are preserved.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static ModuleDef AddOrUpdateLookupListModule(string TableName, string Name, string TitleKey)
Parameters
Returns
AddOrUpdateLookupSource(string, Type, bool?)
Adds or updates an enum lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookupSource(string Name, Type EnumType, bool? UseNullItem = null)
Parameters
Returns
AddOrUpdateLookupSource(Type, bool?)
Adds or updates an enum lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookupSource(Type EnumType, bool? UseNullItem = null)
Parameters
Returns
AddOrUpdateLookupWithClassName(string, string, string, bool?)
Adds or updates a class lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookupWithClassName(string Name, string ClassName, string FormName = null, bool? UseNullItem = null)
Parameters
Returns
AddOrUpdateLookupWithSql(string, string, string, bool?)
Adds or updates a SQL lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookupWithSql(string Name, string SqlText = null, string FormName = null, bool? UseNullItem = null)
Parameters
Returns
AddOrUpdateLookupWithTableName(string, string, string, bool?)
Adds or updates a table lookup definition.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static LookupDef AddOrUpdateLookupWithTableName(string Name, string TableName = null, string FormName = null, bool? UseNullItem = null)
Parameters
Returns
AddOrUpdateModule(string, string, string, string, bool?, UserLevel?)
Adds or updates a module definition.
Existing child definitions and collections are preserved.
NOTE: When the definition already exists, non-null parameters and nullable boolean parameters with a value update its scalar properties. The existing definition instance and its child collections are preserved.
public static ModuleDef AddOrUpdateModule(string Name, string TitleKey = null, string ClassName = null, string ListSelectSql = null, bool? IsSingleSelect = null, UserLevel? SecurityLevel = null)
Parameters
NamestringTitleKeystringClassNamestringListSelectSqlstringIsSingleSelectbool?SecurityLevelUserLevel?
Returns
CreateModule(string, bool)
Creates and returns a DataModule based on its registered name.
public static DataModule CreateModule(string Name, bool InitializeToo = true)
Parameters
Returns
FindLocator(string)
Returns a locator definition, if any, else null.
public static LocatorDef FindLocator(string Name)
Parameters
Namestring
Returns
GetLocator(string)
Returns a locator definition, if any, else exception.
public static LocatorDef GetLocator(string Name)
Parameters
Namestring
Returns
UpdateLocatorReferences()
Locators are not part of module, so we need a way to update references.
public static void UpdateLocatorReferences()