Namespace: | Sirenix.Utilities |
Assembly: | Sirenix.Utilities |
public sealed class MemberAliasMethodInfo : MethodInfo, ICustomAttributeProvider, _MemberInfo, _MethodBase, _MethodInfo
In this case, what we're representing is a method on a parent class with the same name.
We aggregate the MethodInfo associated with this member and return a mangled form of the name. The name that we return is "parentname+methodName".
public MemberAliasMethodInfo(MethodInfo method, string namePrefix)
System.Reflection.MethodInfo | method | The method to alias. |
System.String | namePrefix | The name prefix to use. |
public MemberAliasMethodInfo(MethodInfo method, string namePrefix, string separatorString)
System.Reflection.MethodInfo | method | The method to alias. |
System.String | namePrefix | The name prefix to use. |
System.String | separatorString | The separator string to use. |
public MethodInfo AliasedMethod { get; }
public override MethodAttributes Attributes { get; }
public override Type DeclaringType { get; }
public override RuntimeMethodHandle MethodHandle { get; }
public override string Name { get; }
public override Type ReflectedType { get; }
public override Type ReturnType { get; }
public override ICustomAttributeProvider ReturnTypeCustomAttributes { get; }
public override MethodInfo GetBaseDefinition()
System.Reflection.MethodInfo | A MethodInfo object for the first implementation of this method. |
public override object[] GetCustomAttributes(bool inherit)
System.Boolean | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. |
System.Object[] | An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. |
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
System.Type | attributeType | The type of attribute to search for. Only attributes that are assignable to this type are returned. |
System.Boolean | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. |
System.Object[] |
An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to |
public override MethodImplAttributes GetMethodImplementationFlags()
System.Reflection.MethodImplAttributes | The MethodImplAttributes flags. |
public override ParameterInfo[] GetParameters()
System.Reflection.ParameterInfo[] | An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance. |
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
System.Object | obj | The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor. |
System.Reflection.BindingFlags | invokeAttr | A bitmask that is a combination of 0 or more bit flags from System.Reflection.BindingFlags. If |
System.Reflection.Binder | binder | An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If |
System.Object[] | parameters | An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type. |
System.Globalization.CultureInfo | culture | An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.) |
System.Object |
An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the |
public override bool IsDefined(Type attributeType, bool inherit)
System.Type | attributeType | The type of custom attribute to search for. The search includes derived types. |
System.Boolean | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks. |
System.Boolean |
true if one or more instances of |