public bool Equals(RuntimeMethodCommon other)
 {
     if (!(this._reader == other._reader))
     {
         return(false);
     }
     if (!(this._methodHandle.Equals(other._methodHandle)))
     {
         return(false);
     }
     if (!(this._contextTypeInfo.Equals(other._contextTypeInfo)))
     {
         return(false);
     }
     return(true);
 }
 //
 // methodHandle    - the "tkMethodDef" that identifies the method.
 // definingType   - the "tkTypeDef" that defined the method (this is where you get the metadata reader that created methodHandle.)
 // contextType    - the type that supplies the type context (i.e. substitutions for generic parameters.) Though you
 //                  get your raw information from "definingType", you report "contextType" as your DeclaringType property.
 //
 //  For example:
 //
 //       typeof(Foo<>).GetTypeInfo().DeclaredMembers
 //
 //           The definingType and contextType are both Foo<>
 //
 //       typeof(Foo<int,String>).GetTypeInfo().DeclaredMembers
 //
 //          The definingType is "Foo<,>"
 //          The contextType is "Foo<int,String>"
 //
 //  We don't report any DeclaredMembers for arrays or generic parameters so those don't apply.
 //
 private RuntimePlainConstructorInfo(MethodHandle methodHandle, RuntimeNamedTypeInfo definingTypeInfo, RuntimeTypeInfo contextTypeInfo)
 {
     _common = new RuntimeMethodCommon(methodHandle, definingTypeInfo, contextTypeInfo);
 }
Exemple #3
0
 public sealed override String ToString()
 {
     // A constructor's "return type" is always System.Void and we don't want to allocate a ParameterInfo object to record that revelation.
     // In deference to that, ComputeToString() lets us pass null as a synonym for "void."
     return(RuntimeMethodCommon.ComputeToString(this, Array.Empty <RuntimeTypeInfo>(), RuntimeParameters, returnParameter: null));
 }
Exemple #4
0
 public sealed override String ToString()
 {
     return(RuntimeMethodCommon.ComputeToString(this, Array.Empty <RuntimeType>(), GetRuntimeParametersAndReturn(this)));
 }
 public sealed override String ToString()
 {
     return(RuntimeMethodCommon.ComputeToString(this, Array.Empty <RuntimeTypeInfo>(), RuntimeParameters, RuntimeReturnParameter));
 }
 //
 // methodHandle    - the "tkMethodDef" that identifies the method.
 // definingType   - the "tkTypeDef" that defined the method (this is where you get the metadata reader that created methodHandle.)
 // contextType    - the type that supplies the type context (i.e. substitutions for generic parameters.) Though you
 //                  get your raw information from "definingType", you report "contextType" as your DeclaringType property.
 //
 //  For example:
 //
 //       typeof(Foo<>).GetTypeInfo().DeclaredMembers
 //
 //           The definingType and contextType are both Foo<>
 //
 //       typeof(Foo<int,String>).GetTypeInfo().DeclaredMembers
 //
 //          The definingType is "Foo<,>"
 //          The contextType is "Foo<int,String>"
 //
 //  We don't report any DeclaredMembers for arrays or generic parameters so those don't apply.
 //
 private RuntimeNamedMethodInfo(MethodHandle methodHandle, RuntimeNamedTypeInfo definingTypeInfo, RuntimeTypeInfo contextTypeInfo)
     : base()
 {
     _common = new RuntimeMethodCommon(methodHandle, definingTypeInfo, contextTypeInfo);
 }
 //
 // methodHandle    - the "tkMethodDef" that identifies the method.
 // definingType   - the "tkTypeDef" that defined the method (this is where you get the metadata reader that created methodHandle.)
 // contextType    - the type that supplies the type context (i.e. substitutions for generic parameters.) Though you
 //                  get your raw information from "definingType", you report "contextType" as your DeclaringType property.
 //
 //  For example:
 //
 //       typeof(Foo<>).GetTypeInfo().DeclaredMembers
 //
 //           The definingType and contextType are both Foo<>
 //
 //       typeof(Foo<int,String>).GetTypeInfo().DeclaredMembers
 //
 //          The definingType is "Foo<,>"
 //          The contextType is "Foo<int,String>"
 //
 //  We don't report any DeclaredMembers for arrays or generic parameters so those don't apply.
 //
 private RuntimeNamedMethodInfo(MethodHandle methodHandle, RuntimeNamedTypeInfo definingTypeInfo, RuntimeTypeInfo contextTypeInfo)
     : base()
 {
     _common = new RuntimeMethodCommon(methodHandle, definingTypeInfo, contextTypeInfo);
 }
 //
 // methodHandle    - the "tkMethodDef" that identifies the method.
 // definingType   - the "tkTypeDef" that defined the method (this is where you get the metadata reader that created methodHandle.)
 // contextType    - the type that supplies the type context (i.e. substitutions for generic parameters.) Though you
 //                  get your raw information from "definingType", you report "contextType" as your DeclaringType property.
 //
 //  For example:
 //
 //       typeof(Foo<>).GetTypeInfo().DeclaredMembers
 //
 //           The definingType and contextType are both Foo<>
 //
 //       typeof(Foo<int,String>).GetTypeInfo().DeclaredMembers
 //
 //          The definingType is "Foo<,>"
 //          The contextType is "Foo<int,String>"
 //
 //  We don't report any DeclaredMembers for arrays or generic parameters so those don't apply.
 //
 private RuntimePlainConstructorInfo(MethodHandle methodHandle, RuntimeNamedTypeInfo definingTypeInfo, RuntimeTypeInfo contextTypeInfo)
 {
     _common = new RuntimeMethodCommon(methodHandle, definingTypeInfo, contextTypeInfo);
 }
 public bool Equals(RuntimeMethodCommon other)
 {
     if (!(this._reader == other._reader))
         return false;
     if (!(this._methodHandle.Equals(other._methodHandle)))
         return false;
     if (!(this._contextTypeInfo.Equals(other._contextTypeInfo)))
         return false;
     return true;
 }