C# Class EFUtility.CodeGenerationTools.MetadataLoader.ItemCollectionBuilder

Base class for ItemCollectionBuilder classes that loads the specific types of metadata
Mostra file Open project: jradxl/Entity-Framework-Code-Generation-Tools-Experiments

Public Methods

Method Description
TryCreateItemCollection ( string sourcePath, ItemCollection &itemCollection ) : bool

Try to create an ItemCollection loaded with the metadata provided

TryLoadRootElement ( string sourcePath, System.Xml.Linq.XElement &schemaElement ) : bool

Tries to load the root element from the metadata file provided

Protected Methods

Method Description
CreateItemCollection ( IEnumerable readers, IList &errors ) : ItemCollection

Method to build the appropriate ItemCollection

GetNamespace ( SchemaConstants constants ) : string

Selects a namespace from the supplied constants.

ItemCollectionBuilder ( DynamicTextTransformation textTransformation, string fileExtension, string edmxSectionName, string rootElementName ) : System

Ctor to setup the ItemCollectionBuilder members

Private Methods

Method Description
ProcessErrors ( IEnumerable errors, string sourceFilePath ) : bool

Takes an Enumerable of EdmSchemaErrors, and adds them to the errors collection of the template class

TryLoadRootElementFromEdmx ( System.Xml.Linq.XElement edmxDocument, SchemaConstants schemaConstants, string sectionName, string rootElementName, System.Xml.Linq.XElement &rootElement ) : bool

Tries to load the root element from the provided edmxDocument

TryLoadRootElementFromEdmx ( string edmxPath, System.Xml.Linq.XElement &rootElement ) : bool

Tries to load the root element from the provided .edmx metadata file

Method Details

CreateItemCollection() protected abstract method

Method to build the appropriate ItemCollection
protected abstract CreateItemCollection ( IEnumerable readers, IList &errors ) : ItemCollection
readers IEnumerable
errors IList
return ItemCollection

GetNamespace() protected abstract method

Selects a namespace from the supplied constants.
protected abstract GetNamespace ( SchemaConstants constants ) : string
constants SchemaConstants
return string

ItemCollectionBuilder() protected method

Ctor to setup the ItemCollectionBuilder members
protected ItemCollectionBuilder ( DynamicTextTransformation textTransformation, string fileExtension, string edmxSectionName, string rootElementName ) : System
textTransformation DynamicTextTransformation
fileExtension string
edmxSectionName string
rootElementName string
return System

TryCreateItemCollection() public method

Try to create an ItemCollection loaded with the metadata provided
public TryCreateItemCollection ( string sourcePath, ItemCollection &itemCollection ) : bool
sourcePath string
itemCollection ItemCollection
return bool

TryLoadRootElement() public method

Tries to load the root element from the metadata file provided
public TryLoadRootElement ( string sourcePath, System.Xml.Linq.XElement &schemaElement ) : bool
sourcePath string
schemaElement System.Xml.Linq.XElement
return bool