C# Класс EFUtility.CodeGenerationTools.MetadataLoader

Responsible for loading an EdmItemCollection from a .edmx file or .csdl files
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
DefineMetadata ( ) : void
ValidateInputPath ( string sourcePath, DynamicTextTransformation textTransformation ) : bool

Returns true if the specified file path is valid

Описание методов

CreateEdmItemCollection() публичный Метод

Create an EdmItemCollection loaded with the metadata provided
public CreateEdmItemCollection ( string sourcePath ) : System.Data.Metadata.Edm.EdmItemCollection
sourcePath string
Результат System.Data.Metadata.Edm.EdmItemCollection

GetModelNamespace() публичный Метод

Gets the Model Namespace from the provided schema file.
public GetModelNamespace ( string sourcePath ) : string
sourcePath string
Результат string

MetadataLoader() публичный Метод

Initializes an MetadataLoader Instance with the TextTransformation (T4 generated class) that is currently running
public MetadataLoader ( object textTransformation ) : System
textTransformation object
Результат System

TryCreateEdmItemCollection() публичный Метод

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
Результат bool

TryCreateEdmItemCollection() публичный Метод

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
Результат bool

TryCreateStorageMappingItemCollection() публичный Метод

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
Результат bool

TryCreateStoreItemCollection() публичный Метод

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
Результат bool

TryLoadAllMetadata() публичный Метод

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
Результат bool