Click or drag to resize

ValueExpressionParserTInitializeType Method

Validates that any static type T functionality is initialized.

Namespace: GSF.ComponentModel
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.256-beta+0e7e94d39a9b10efe7e26e3b8d5130afc0dd4d74
Syntax
public static bool InitializeType()
View Source

Return Value

Boolean
true if type T supports a parameterless constructor and was successfully initialized; otherwise, false.
Remarks
As long as type T defines a parameterless constructor, this method will create an instance of the modeled class so that any defined static functionality will be initialized. Calling this method in advance of any of the static create or update delegate generation functions will allow modeled types to self-register any custom symbols and types that may be used during evaluation of value expressions attributes, e.g.:
C#
static MyModel()
{
    TableOperations<MyModel>.TypeRegistry.RegisterType<MyType>();
}
See Also