C# Class Composite.Data.DataMetaDataFacade

Exibir arquivo Open project: Orckestra/C1-CMS Class Usage Examples

Public Methods

Method Description
DeleteMetaData ( System.Guid dataTypeId ) : void
GetDataTypeDescriptor ( System.Guid dataTypeId, bool allowTypeMetaDataCreation = false ) : DataTypeDescriptor

This method will return the data type descriptor for the given data type id. If the data type descriptor has not yet been created (file not existing) and the allowTypeMetaDataCreation is set to true, this method will try getting it through the Composite.Data.DynamicTypes.Foundation.ReflectionBasedDescriptorBuilder that will try locating the type from the data type id using refelection going through know assemblies.

GetDataTypeDescriptor ( Type interfaceType, bool allowTypeMetaDataCreation = false ) : DataTypeDescriptor

This method will return the data type descriptor for the given data type id. If the data type descriptor has not yet been created (file not existing) and the allowTypeMetaDataCreation is set to true, this method will try getting it through the Composite.Data.DynamicTypes.Foundation.ReflectionBasedDescriptorBuilder based on interfaceType.

PersistMetaData ( DataTypeDescriptor dataTypeDescriptor ) : void

Private Methods

Method Description
CreateFilename ( DataTypeDescriptor dataTypeDescriptor ) : string
DataMetaDataFacade ( ) : System
Flush ( ) : void
GetGuidFromFilename ( string filepath ) : System.Guid
GetTypeManagerTypeNameToTypeIdMap ( ) : Guid>.Dictionary

Used for processing xml/sql data providers configuration build by C1 vesrion older than 3.0

Initialize ( ) : void
IsMetaDataFileName ( string fileNameWithoutExtension ) : bool
LoadFromFile ( string filePath ) : DataTypeDescriptor
UpdateFilenames ( ) : void

Method Details

DeleteMetaData() public static method

public static DeleteMetaData ( System.Guid dataTypeId ) : void
dataTypeId System.Guid
return void

GetDataTypeDescriptor() public static method

This method will return the data type descriptor for the given data type id. If the data type descriptor has not yet been created (file not existing) and the allowTypeMetaDataCreation is set to true, this method will try getting it through the Composite.Data.DynamicTypes.Foundation.ReflectionBasedDescriptorBuilder that will try locating the type from the data type id using refelection going through know assemblies.
public static GetDataTypeDescriptor ( System.Guid dataTypeId, bool allowTypeMetaDataCreation = false ) : DataTypeDescriptor
dataTypeId System.Guid The id of the data type.
allowTypeMetaDataCreation bool /// If this is true and the data type descriptor does not exists, the method will try to create it. ///
return Composite.Data.DynamicTypes.DataTypeDescriptor

GetDataTypeDescriptor() public static method

This method will return the data type descriptor for the given data type id. If the data type descriptor has not yet been created (file not existing) and the allowTypeMetaDataCreation is set to true, this method will try getting it through the Composite.Data.DynamicTypes.Foundation.ReflectionBasedDescriptorBuilder based on interfaceType.
public static GetDataTypeDescriptor ( Type interfaceType, bool allowTypeMetaDataCreation = false ) : DataTypeDescriptor
interfaceType System.Type The data type.
allowTypeMetaDataCreation bool /// If this is true and the data type descriptor does not exists, it will be created. ///
return Composite.Data.DynamicTypes.DataTypeDescriptor

PersistMetaData() public static method

public static PersistMetaData ( DataTypeDescriptor dataTypeDescriptor ) : void
dataTypeDescriptor Composite.Data.DynamicTypes.DataTypeDescriptor
return void