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; }
protected MemberReflector(TMemberInfo reflectionInfo) { _reflectionInfo = reflectionInfo ?? throw new ArgumentNullException(nameof(reflectionInfo)); _customAttributeReflectors = _reflectionInfo.GetCustomAttributesData().Select(data => CustomAttributeReflector.Create(data)).ToArray(); }