/////////////////////////////////////////////////////////////// // This is generated code. ////////////////////////////////////////////////////////////// // Code is generated using LLBLGen Pro version: 4.2 // Code is generated on: // Code is generated using templates: SD.TemplateBindings.SharedTemplates // Templates vendor: Solutions Design. // Templates version: ////////////////////////////////////////////////////////////// using System; using Datalib; using Datalib.HelperClasses; using System.Collections.Generic; using SD.LLBLGen.Pro.ORMSupportClasses; namespace Datalib.FactoryClasses { /// Generates IEntityFields2 instances for different kind of Entities. public static partial class EntityFieldsFactory { private static readonly Dictionary _entityTypeNamesCache = new Dictionary(); /// static ctor which initializes the static entity type cache. static EntityFieldsFactory() { foreach(Datalib.EntityType value in Enum.GetValues(typeof(Datalib.EntityType))) { _entityTypeNamesCache.Add(value, Enum.GetName(typeof(Datalib.EntityType), value)); } } /// General factory entrance method which will return an EntityFields2 object with the format generated by the factory specified /// The type of entity the fields are for /// The IEntityFields instance requested public static IEntityFields2 CreateEntityFieldsObject(Datalib.EntityType relatedEntityType) { return FieldInfoProviderSingleton.GetInstance().GetEntityFields(InheritanceInfoProviderSingleton.GetInstance(), _entityTypeNamesCache[relatedEntityType]); } /// General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields. /// the name of the entity to get the fields for. Example: "CustomerEntity" /// array of IEntityFieldCore fields, defined in the entity with the name specified internal static IEntityFieldCore[] CreateFields(string entityName) { return FieldInfoProviderSingleton.GetInstance().GetEntityFieldsArray(entityName); } #region Included Code #endregion } }