internal override void Initialize() { this._domainServiceDescriptionAggregate = new DomainServiceDescriptionAggregate(this.DomainServiceDescriptions.Where(dsd => dsd.EntityTypes.Contains(this.Type))); this._visibleBaseType = this._domainServiceDescriptionAggregate.GetEntityBaseType(this.Type); this.GenerateGetIdentity = !this.IsDerivedType; this._associationProperties = new List<PropertyDescriptor>(); base.Initialize(); }
internal override void Initialize() { this._domainServiceDescriptionAggregate = new DomainServiceDescriptionAggregate(this.DomainServiceDescriptions.Where(dsd => dsd.EntityTypes.Contains(this.Type))); this._visibleBaseType = this._domainServiceDescriptionAggregate.GetEntityBaseType(this.Type); this.GenerateGetIdentity = !this.IsDerivedType; this._associationProperties = new List <PropertyDescriptor>(); base.Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="EntityProxyGenerator"/> class. /// </summary> /// <param name="proxyGenerator">The client proxy generator against which this will generate code. Cannot be null.</param> /// <param name="entityType">The type of the entity. Cannot be null.</param> /// <param name="allDomainServiceDescriptions">Collection of all <see cref="DomainServiceDescription"/> defined in this project</param> /// <param name="typeMapping">A dictionary of <see cref="DomainService"/> and related entity types that maps to their corresponding client-side <see cref="CodeTypeReference"/> representations.</param> public EntityProxyGenerator(CodeDomClientCodeGenerator proxyGenerator, Type entityType, ICollection<DomainServiceDescription> allDomainServiceDescriptions, IDictionary<Type, CodeTypeDeclaration> typeMapping) : base(proxyGenerator, entityType, typeMapping) { this._domainServiceDescriptionAggregate = new DomainServiceDescriptionAggregate(allDomainServiceDescriptions.Where(dsd => dsd.EntityTypes.Contains(entityType))); this._allDomainServiceDescriptions = allDomainServiceDescriptions; // Determine this entity's logical (visible) base type based on the type hierarchy // and list of known types. Null meant it was already the root. this._visibleBaseType = this._domainServiceDescriptionAggregate.GetEntityBaseType(this.Type); this._generateGetIdentity = !this.IsDerivedType; this._keyProperties = new List<PropertyDescriptor>(); }