private static Type GetAssociateMetadataTypeFromAttribute(Type type) { Type metadataTypeAttributeType = JsonTypeReflector.GetMetadataTypeAttributeType(); if (metadataTypeAttributeType == null) { return(null); } object obj = type.GetCustomAttributes(metadataTypeAttributeType, true).SingleOrDefault <object>(); if (obj == null) { return(null); } return((new LateBoundMetadataTypeAttribute(obj)).MetadataClassType); }
private static Type GetAssociateMetadataTypeFromAttribute(Type type) { Type metadataTypeAttributeType = JsonTypeReflector.GetMetadataTypeAttributeType(); if (metadataTypeAttributeType == null) { return(null); } object obj = type.GetCustomAttributes(metadataTypeAttributeType, true).SingleOrDefault <object>(); if (obj == null) { return(null); } IMetadataTypeAttribute metadataTypeAttribute = JsonTypeReflector.DynamicCodeGeneration ? DynamicWrapper.CreateWrapper <IMetadataTypeAttribute>(obj) : new LateBoundMetadataTypeAttribute(obj); return(metadataTypeAttribute.MetadataClassType); }