C# Class EFUtility.CodeGenerationTools.MetadataLoader

Responsible for loading an EdmItemCollection from a .edmx file or .csdl files
Afficher le fichier Open project: jradxl/Entity-Framework-Code-Generation-Tools-Experiments Class Usage Examples

Méthodes publiques

Méthode Description
CreateEdmItemCollection ( string sourcePath ) : System.Data.Metadata.Edm.EdmItemCollection

Create an EdmItemCollection loaded with the metadata provided

GetModelNamespace ( string sourcePath ) : string

Gets the Model Namespace from the provided schema file.

MetadataLoader ( object textTransformation ) : System

Initializes an MetadataLoader Instance with the TextTransformation (T4 generated class) that is currently running

TryCreateEdmItemCollection ( string sourcePath, System.Data.Metadata.Edm.EdmItemCollection &edmItemCollection ) : bool

Attempts to create a EdmItemCollection from the specified metadata file

TryCreateEdmItemCollection ( string sourcePath, string referenceSchemas, System.Data.Metadata.Edm.EdmItemCollection &edmItemCollection ) : bool

Attempts to create a EdmItemCollection from the specified metadata file

TryCreateStorageMappingItemCollection ( string sourcePath, System.Data.Metadata.Edm.EdmItemCollection edmItemCollection, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection, System.Data.Mapping.StorageMappingItemCollection &storageMappingItemCollection ) : bool

Attempts to create a StorageMappingItemCollection from the specified metadata file, EdmItemCollection, and StoreItemCollection

TryCreateStoreItemCollection ( string sourcePath, System.Data.Metadata.Edm.StoreItemCollection &storeItemCollection ) : bool

Attempts to create a StoreItemCollection from the specified metadata file

TryLoadAllMetadata ( string inputFile, MetadataWorkspace &metadataWorkspace ) : bool

Load the metadata for Edm, Store, and Mapping collections and register them with a new MetadataWorkspace, returns false if any of the parts can't be created, some of the ItemCollections may be registered and usable even if false is returned

Private Methods

Méthode Description
DefineMetadata ( ) : void
ValidateInputPath ( string sourcePath, DynamicTextTransformation textTransformation ) : bool

Returns true if the specified file path is valid

Method Details

CreateEdmItemCollection() public méthode

Create an EdmItemCollection loaded with the metadata provided
public CreateEdmItemCollection ( string sourcePath ) : System.Data.Metadata.Edm.EdmItemCollection
sourcePath string
Résultat System.Data.Metadata.Edm.EdmItemCollection

GetModelNamespace() public méthode

Gets the Model Namespace from the provided schema file.
public GetModelNamespace ( string sourcePath ) : string
sourcePath string
Résultat string

MetadataLoader() public méthode

Initializes an MetadataLoader Instance with the TextTransformation (T4 generated class) that is currently running
public MetadataLoader ( object textTransformation ) : System
textTransformation object
Résultat System

TryCreateEdmItemCollection() public méthode

Attempts to create a EdmItemCollection from the specified metadata file
public TryCreateEdmItemCollection ( string sourcePath, System.Data.Metadata.Edm.EdmItemCollection &edmItemCollection ) : bool
sourcePath string
edmItemCollection System.Data.Metadata.Edm.EdmItemCollection
Résultat bool

TryCreateEdmItemCollection() public méthode

Attempts to create a EdmItemCollection from the specified metadata file
public TryCreateEdmItemCollection ( string sourcePath, string referenceSchemas, System.Data.Metadata.Edm.EdmItemCollection &edmItemCollection ) : bool
sourcePath string
referenceSchemas string
edmItemCollection System.Data.Metadata.Edm.EdmItemCollection
Résultat bool

TryCreateStorageMappingItemCollection() public méthode

Attempts to create a StorageMappingItemCollection from the specified metadata file, EdmItemCollection, and StoreItemCollection
public TryCreateStorageMappingItemCollection ( string sourcePath, System.Data.Metadata.Edm.EdmItemCollection edmItemCollection, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection, System.Data.Mapping.StorageMappingItemCollection &storageMappingItemCollection ) : bool
sourcePath string
edmItemCollection System.Data.Metadata.Edm.EdmItemCollection
storeItemCollection System.Data.Metadata.Edm.StoreItemCollection
storageMappingItemCollection System.Data.Mapping.StorageMappingItemCollection
Résultat bool

TryCreateStoreItemCollection() public méthode

Attempts to create a StoreItemCollection from the specified metadata file
public TryCreateStoreItemCollection ( string sourcePath, System.Data.Metadata.Edm.StoreItemCollection &storeItemCollection ) : bool
sourcePath string
storeItemCollection System.Data.Metadata.Edm.StoreItemCollection
Résultat bool

TryLoadAllMetadata() public méthode

Load the metadata for Edm, Store, and Mapping collections and register them with a new MetadataWorkspace, returns false if any of the parts can't be created, some of the ItemCollections may be registered and usable even if false is returned
public TryLoadAllMetadata ( string inputFile, MetadataWorkspace &metadataWorkspace ) : bool
inputFile string
metadataWorkspace MetadataWorkspace
Résultat bool