public AssociatedMetadataTypeTypeDescriptor(ICustomTypeDescriptor parent, Type type, Type associatedMetadataType) : base(parent) { AssociatedMetadataType = associatedMetadataType ?? TypeDescriptorCache.GetAssociatedMetadataType(type); if (AssociatedMetadataType != null) { TypeDescriptorCache.ValidateMetadataType(type, AssociatedMetadataType); } }
public GeneratedMetadataTypeDescriptor(ICustomTypeDescriptor parent, Type type) : base(parent) { this.generatedMetadataType = TypeDescriptorCache.GetGeneratedMetadataType(type); if (this.generatedMetadataType != null) { TypeDescriptorCache.ValidateMetadataType(type, this.generatedMetadataType); } }
public AssociatedMetadataTypeTypeDescriptor( ICustomTypeDescriptor parent, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type associatedMetadataType) : base(parent) { AssociatedMetadataType = associatedMetadataType ?? TypeDescriptorCache.GetAssociatedMetadataType(type); IsSelfAssociated = (type == AssociatedMetadataType); if (AssociatedMetadataType != null) { TypeDescriptorCache.ValidateMetadataType(type, AssociatedMetadataType); } }