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);
     }
 }
Exemple #3
0
 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);
     }
 }