예제 #1
0
        /// <summary>
        /// Emit generic method instantiation to the output string builder.
        /// </summary>
        /// <param name="methodInstHandle">Method instantiation handle</param>
        private void EmitMethodInstantiationName(MethodInstantiationHandle methodInstHandle)
        {
            MethodInstantiation   methodInst      = _metadataReader.GetMethodInstantiation(methodInstHandle);
            MemberReferenceHandle methodRefHandle = methodInst.Method.ToMemberReferenceHandle(_metadataReader);
            MemberReference       methodRef       = methodRefHandle.GetMemberReference(_metadataReader);
            MethodSignature       methodSignature;

            EmitReturnTypeContainingTypeAndMethodName(methodRef, out methodSignature);
            EmitGenericArguments(methodInst.GenericTypeArguments);
            EmitMethodParameters(methodSignature);
        }
예제 #2
0
        /// <summary>
        /// Emit generic method instantiation to the output string builder.
        /// </summary>
        /// <param name="methodInstHandle">Method instantiation handle</param>
        private void EmitMethodInstantiationName(MethodInstantiationHandle methodInstHandle)
        {
            MethodInstantiation methodInst = _metadataReader.GetMethodInstantiation(methodInstHandle);
            MethodSignature     methodSignature;

            if (methodInst.Method.HandleType == HandleType.MemberReference)
            {
                MemberReferenceHandle methodRefHandle = methodInst.Method.ToMemberReferenceHandle(_metadataReader);
                MemberReference       methodRef       = methodRefHandle.GetMemberReference(_metadataReader);
                EmitContainingTypeAndMethodName(methodRef, out methodSignature);
            }
            else
            {
                QualifiedMethodHandle qualifiedMethodHandle = methodInst.Method.ToQualifiedMethodHandle(_metadataReader);
                QualifiedMethod       qualifiedMethod       = _metadataReader.GetQualifiedMethod(qualifiedMethodHandle);
                EmitContainingTypeAndMethodName(qualifiedMethod, out methodSignature);
            }
            EmitGenericArguments(methodInst.GenericTypeArguments);
            EmitMethodParameters(methodSignature);
        }