Example #1
0
 public static Method Unresolved(MethodIdentifier methodIdentifier, DeclaredType type, MethodInfo representedMethod, IReferencable returnType)
 {
     return new Method(methodIdentifier, type)
     {
         IsResolved = false,
         representedMethod = representedMethod,
         ReturnType = returnType
     };
 }
Example #2
0
        public static MethodIdentifier FromMethod(MethodInfo method, Type type)
        {
            string name       = method.Name;
            var    parameters = new List <TypeIdentifier>();

            if (method.IsGenericMethod)
            {
                name += GENERIC_PARAMATER_PREFIX + method.GetGenericArguments().Length;
            }

            try {
                foreach (ParameterInfo param in method.GetParameters())
                {
                    parameters.Add(FromType(param.ParameterType));
                }
            } catch (IOException ex) {
                return(MethodIdentifier.FromException(name, FromType(type), ex));
            }

            return(new MethodIdentifier(name, parameters.ToArray(), method.IsStatic, method.IsPublic, FromType(type)));
        }
Example #3
0
 public static Method Unresolved(MethodIdentifier methodIdentifier, DeclaredType type)
 {
     return new Method(methodIdentifier, type) { IsResolved = false };
 }
Example #4
0
 public Method(MethodIdentifier identifier, DeclaredType type)
     : base(identifier)
 {
     Type = type;
     Returns = new Summary();
 }
Example #5
0
 public static Method Unresolved(MethodIdentifier methodIdentifier, DeclaredType type, MethodBase declaration, IReferencable returnType)
 {
     return new Method(methodIdentifier, type)
         {
             IsResolved = false, declaration = declaration, ReturnType = returnType
         };
 }
Example #6
0
 public static Method Unresolved(MethodIdentifier methodIdentifier)
 {
     return new Method(methodIdentifier) { IsResolved = false };
 }
Example #7
0
 public Method(MethodIdentifier identifier)
     : base(identifier)
 {
     Summary = new List<IComment>();
 }