/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="member">The member to which the parameter belongs.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="member"/> is null.</exception> public StaticParameterWrapper(StaticReflectionPolicy policy, object handle, StaticMemberWrapper member) : base(policy, handle) { if (member == null) throw new ArgumentNullException("member"); this.member = member; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <param name="arrayRank">The array rank.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="arrayRank"/> is less than 1.</exception> public StaticArrayTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType, int arrayRank) : base(policy, elementType) { if (arrayRank <= 0) throw new ArgumentOutOfRangeException("arrayRank", "The array rank must be at least 1."); this.arrayRank = arrayRank; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="member">The member to which the parameter belongs.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="member"/> is null.</exception> public StaticParameterWrapper(StaticReflectionPolicy policy, object handle, StaticMemberWrapper member) : base(policy, handle) { if (member == null) { throw new ArgumentNullException("member"); } this.member = member; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <param name="arrayRank">The array rank.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="arrayRank"/> is less than 1.</exception> public StaticArrayTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType, int arrayRank) : base(policy, elementType) { if (arrayRank <= 0) { throw new ArgumentOutOfRangeException("arrayRank", "The array rank must be at least 1."); } this.arrayRank = arrayRank; }
/// <summary> /// Creates a wrapper for a generic type parameter. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type, which must be a generic type definition.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="declaringType"/> is null.</exception> public static StaticGenericParameterWrapper CreateGenericTypeParameter(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) { if (declaringType == null) { throw new ArgumentNullException("declaringType"); } return(new StaticGenericParameterWrapper(policy, handle, declaringType, null)); }
/// <summary> /// Creates a wrapper for a generic method parameter. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringMethod">The declaring method, which must be a generic method definition.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="declaringMethod"/> is null.</exception> public static StaticGenericParameterWrapper CreateGenericMethodParameter(StaticReflectionPolicy policy, object handle, StaticMethodWrapper declaringMethod) { if (declaringMethod == null) { throw new ArgumentNullException("declaringMethod"); } return(new StaticGenericParameterWrapper(policy, handle, declaringMethod.DeclaringType, declaringMethod)); }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> protected StaticReflectedMemberWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType) { if (declaringType == null) throw new ArgumentNullException("declaringType"); if (reflectedType == null) throw new ArgumentNullException("reflectedType"); this.reflectedType = reflectedType; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticWrapper(StaticReflectionPolicy policy, object handle) { if (policy == null) { throw new ArgumentNullException("policy"); } if (handle == null) { throw new ArgumentNullException("handle"); } this.reflectionPolicy = policy; this.handle = handle; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> protected StaticReflectedMemberWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType) { if (declaringType == null) { throw new ArgumentNullException("declaringType"); } if (reflectedType == null) { throw new ArgumentNullException("reflectedType"); } this.reflectedType = reflectedType; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticAttributeWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type, or null if none.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> protected StaticFunctionWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType, reflectedType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> public StaticByRefTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType) : base(policy, elementType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> protected StaticConstructedTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType) : base(policy, elementType, null) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <param name="substitution">The type substitution for generic parameters.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// or <paramref name="declaringType"/> or <paramref name="reflectedType"/> is null.</exception> public StaticMethodWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType, StaticTypeSubstitution substitution) : base(policy, handle, declaringType, reflectedType) { this.substitution = substitution; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticCodeElementWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
private StaticGenericParameterWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticMethodWrapper declaringMethod) : base(policy, handle, declaringType) { this.declaringMethod = declaringMethod; }
/// <summary> /// Creates a wrapper for a generic type parameter. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type, which must be a generic type definition.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="declaringType"/> is null.</exception> public static StaticGenericParameterWrapper CreateGenericTypeParameter(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) { if (declaringType == null) throw new ArgumentNullException("declaringType"); return new StaticGenericParameterWrapper(policy, handle, declaringType, null); }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticAttributeWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// or <paramref name="declaringType"/> is null.</exception> public StaticConstructorWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) : base(policy, handle, declaringType, declaringType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticAssemblyWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// or <paramref name="declaringType"/> is null.</exception> public StaticConstructorWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) : base(policy, handle, declaringType, declaringType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type, or null if none.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> protected StaticMemberWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) : base(policy, handle) { this.declaringType = declaringType; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticAssemblyWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> public StaticEventWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType, reflectedType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> public StaticPointerTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType) : base(policy, elementType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> public StaticEventWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType, reflectedType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type.</param> /// <param name="substitution">The type substitution for generic parameters.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// or <paramref name="declaringType"/> or <paramref name="reflectedType"/> is null.</exception> public StaticMethodWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType, StaticTypeSubstitution substitution) : base(policy, handle, declaringType, reflectedType) { this.substitution = substitution; }
private StaticGenericParameterWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticMethodWrapper declaringMethod) : base(policy, handle, declaringType) { this.declaringMethod = declaringMethod; }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="elementType">The element type.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="elementType" /> is null.</exception> protected StaticConstructedTypeWrapper(StaticReflectionPolicy policy, StaticTypeWrapper elementType) : base(policy, elementType, null) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> public StaticCodeElementWrapper(StaticReflectionPolicy policy, object handle) : base(policy, handle) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type.</param> /// <param name="reflectedType">The reflected type, or null if none.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/>, /// <paramref name="declaringType"/>, or <paramref name="reflectedType"/> is null.</exception> protected StaticFunctionWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType, StaticDeclaredTypeWrapper reflectedType) : base(policy, handle, declaringType, reflectedType) { }
/// <summary> /// Creates a wrapper. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringType">The declaring type, or null if none.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/> or <paramref name="handle"/> is null.</exception> protected StaticMemberWrapper(StaticReflectionPolicy policy, object handle, StaticDeclaredTypeWrapper declaringType) : base(policy, handle) { this.declaringType = declaringType; }
/// <summary> /// Creates a wrapper for a generic method parameter. /// </summary> /// <param name="policy">The reflection policy.</param> /// <param name="handle">The underlying reflection object.</param> /// <param name="declaringMethod">The declaring method, which must be a generic method definition.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="policy"/>, <paramref name="handle"/> /// or <paramref name="declaringMethod"/> is null.</exception> public static StaticGenericParameterWrapper CreateGenericMethodParameter(StaticReflectionPolicy policy, object handle, StaticMethodWrapper declaringMethod) { if (declaringMethod == null) throw new ArgumentNullException("declaringMethod"); return new StaticGenericParameterWrapper(policy, handle, declaringMethod.DeclaringType, declaringMethod); }