internal FastPropertyInfo(IMemberExtensionService memberExtensionService, PropertyInfo propertyInfo) : base(memberExtensionService, propertyInfo.DeclaringType, propertyInfo.PropertyType, propertyInfo.Name, propertyInfo.GetCustomAttributes()) { _propertyInfo = propertyInfo; var targetType = propertyInfo.DeclaringType; if (targetType == null) { throw new ArgumentException("PropertyInfo.DeclaringType was null"); } _getFunction = CreateGetFunction(propertyInfo, targetType); _setAction = CreateSetAction(propertyInfo, targetType); }
protected FastMemberBase( IMemberExtensionService memberExtensionService, [CanBeNull] Type containingType, [CanBeNull] Type memberType, string name, IEnumerable <Attribute> attributes) { if (containingType == null) { throw new ArgumentException("The containingType of member " + name + " was null. This is not allowed", nameof(containingType)); } if (memberType == null) { throw new ArgumentException("The memberType of member " + name + " was null. This is not allowed", nameof(memberType)); } Name = name; Type = memberType; _attributes = memberExtensionService.GetAttributesFor(containingType, memberType, name, attributes).ToList(); _attributeTypes = _attributes.Select(a => a.GetType()).ToList(); }
public FastReflectionUtility(IMemberExtensionService memberExtensionService) { _memberExtensionService = memberExtensionService; }
internal FastArgumentInfo(IMemberExtensionService memberExtensionService, ParameterInfo parameterInfo) : base(memberExtensionService, parameterInfo.Member.DeclaringType, parameterInfo.ParameterType, parameterInfo.Name, parameterInfo.GetCustomAttributes()) { _memberExtensionService = memberExtensionService; _declaringType = parameterInfo.Member.DeclaringType; }
public ITestDataConfigurator UseMemberExtensionService(IMemberExtensionService memberExtensionService) { _fastReflectionUtility = new FastReflectionUtility(memberExtensionService); return(this); }