/////////////////////////////////////////////////////////////// // 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 System.Collections.Generic; using Datalib; using Datalib.HelperClasses; using Datalib.FactoryClasses; using Datalib.RelationClasses; using SD.LLBLGen.Pro.ORMSupportClasses; #if !CF using System.Runtime.Serialization; #endif namespace Datalib.EntityClasses { // __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces // __LLBLGENPRO_USER_CODE_REGION_END /// Common base class which is the base class for all generated entities which aren't a subtype of another entity. [Serializable] public abstract partial class CommonEntityBase : EntityBase2 // __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces // __LLBLGENPRO_USER_CODE_REGION_END { #region Class Member Declarations // __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers // __LLBLGENPRO_USER_CODE_REGION_END #endregion /// CTor protected CommonEntityBase() { } /// CTor protected CommonEntityBase(string name):base(name) { } /// Protected CTor for deserialization /// /// protected CommonEntityBase(SerializationInfo info, StreamingContext context) : base(info, context) { // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END } /// Gets the inheritance info provider instance of the project this entity instance is located in. /// ready to use inheritance info provider instance. protected override IInheritanceInfoProvider GetInheritanceInfoProvider() { return InheritanceInfoProviderSingleton.GetInstance(); } /// Creates the ITypeDefaultValue instance used to provide default values for value types which aren't of type nullable(of T) /// protected override ITypeDefaultValue CreateTypeDefaultValueProvider() { return new TypeDefaultValue(); } /// Creates the entity collection and stores it in destination if destination is null /// type of the element to store in the collection /// The type of the factory to pass to the entitycollection ctor. /// Name of the property this collection is for. /// if set to the collection is for an 1:n relationship, and the containing entity info has to be set /// if set to the collection is for an m:n relationship, otherwise for an 1:n relationship /// The destination member variable. /// the collection referred to by destination if destination isn't null, otherwise the newly created collection (which is then stored in destination protected EntityCollection GetOrCreateEntityCollection(string navigatorName, bool setContainingEntityInfo, bool forMN, ref EntityCollection destination) where T:EntityBase2 , IEntity2 { if(destination==null) { destination = new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TFactory))); if(forMN) { ((IEntityCollectionCore)destination).IsForMN = true; } else { if(setContainingEntityInfo) { destination.SetContainingEntityInfo(this, navigatorName); } } destination.ActiveContext = this.ActiveContext; } return destination; } #region Custom Entity code // __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode // __LLBLGENPRO_USER_CODE_REGION_END #endregion #region Included code #endregion } }