internal MethodGenericInvocationDescriptor(MethodBase method, Assembly containingAssembly)
            : this()
        {
            var parts = new List<string>();

            MethodGenericInvocationDescriptor.AddLocation(method, parts);
            MethodGenericInvocationDescriptor.AddCallingConventions(method, parts);
            MethodGenericInvocationDescriptor.AddReturnValue(method, containingAssembly, parts);

            parts.Add(method.GetName(containingAssembly, false) +
                MethodGenericDescriptor.GetGenericDeclarationInformation(
                    method as MethodInfo, containingAssembly, false) +
                MethodGenericInvocationDescriptor.GetMethodArgumentInformation(method, containingAssembly));

            this.Value = string.Join(" ", parts.ToArray());
        }
        internal MethodGenericDeclarationDescriptor(MethodBase method, Assembly containingAssembly)
            : base()
        {
            var descriptors = new List<string>();

            MethodGenericDeclarationDescriptor.AddAttributes(method, descriptors);
            MethodGenericDeclarationDescriptor.AddLocation(method, descriptors);
            MethodGenericDeclarationDescriptor.AddCallingConventions(method, descriptors);
            MethodGenericDeclarationDescriptor.AddReturnType(method, containingAssembly, descriptors);

            descriptors.Add(method.GetName(containingAssembly, true) +
                MethodGenericDescriptor.GetGenericDeclarationInformation(
                    (method as MethodInfo), containingAssembly, true) +
                MethodGenericDeclarationDescriptor.GetMethodArgumentInformation(method, containingAssembly));
            descriptors.Add("cil managed");

            this.Value = string.Join(" ", descriptors.ToArray());
        }
        internal MethodDescriptor(MethodBase method, Assembly containingAssembly, bool isDeclaration)
            : base()
        {
            var parts = new List<string>();

            MethodDescriptor.AddAttributes(method, isDeclaration, parts);
            MethodDescriptor.AddLocation(method, isDeclaration, parts);
            MethodDescriptor.AddCallingConventions(method, parts);
            MethodDescriptor.AddReturnValue(method, containingAssembly, parts);

            parts.Add(method.GetName(containingAssembly, isDeclaration) +
                MethodDescriptor.GetMethodArgumentInformation(method, containingAssembly, isDeclaration));

            if(isDeclaration)
            {
                parts.Add("cil managed");
            }

            this.Value = string.Join(" ", parts.ToArray());
        }
Esempio n. 4
0
 internal DirectMethod(MethodBase method)
 {
     this.Name = method.GetName();
     this.Len = method.GetParameters().Length;
     this.IsFormHandler = method.IsFormHandler();
 }