private CustomAttributeReflector(CustomAttributeData customAttributeData)
 {
     _customAttributeData = customAttributeData ?? throw new ArgumentNullException(nameof(customAttributeData));
     _attributeType       = _customAttributeData.GetType();
     _invoker             = CreateInvoker();
     _tokens = GetAttrTokens(_attributeType);
 }
예제 #2
0
 internal AttributeMetadata(CustomAttributeData attribute)
 {
     if (attribute == null)
     {
         throw new ArgumentNullException("Attribute can't be null.");
     }
     Name      = attribute.GetType().Name;
     SavedHash = attribute.GetHashCode();
 }