Пример #1
0
 private ParameterReflector(ParameterInfo reflectionInfo)
 {
     _reflectionInfo            = reflectionInfo ?? throw new ArgumentNullException(nameof(reflectionInfo));
     _customAttributeReflectors = _reflectionInfo.GetCustomAttributesData().Select(data => CustomAttributeReflector.Create(data)).ToArray();
     HasDeflautValue            = reflectionInfo.DefaultValue != null;
     if (HasDeflautValue)
     {
         DefalutValue = reflectionInfo.DefaultValue;
     }
     Position      = reflectionInfo.Position;
     ParameterType = reflectionInfo.ParameterType;
 }
Пример #2
0
 protected MemberReflector(TMemberInfo reflectionInfo)
 {
     _reflectionInfo            = reflectionInfo ?? throw new ArgumentNullException(nameof(reflectionInfo));
     _customAttributeReflectors = _reflectionInfo.GetCustomAttributesData().Select(data => CustomAttributeReflector.Create(data)).ToArray();
 }