Ejemplo n.º 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
     };
 }
Ejemplo n.º 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)));
        }
Ejemplo n.º 3
0
 public static Method Unresolved(MethodIdentifier methodIdentifier, DeclaredType type)
 {
     return new Method(methodIdentifier, type) { IsResolved = false };
 }
Ejemplo n.º 4
0
 public Method(MethodIdentifier identifier, DeclaredType type)
     : base(identifier)
 {
     Type = type;
     Returns = new Summary();
 }
Ejemplo n.º 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
         };
 }
Ejemplo n.º 6
0
 public static Method Unresolved(MethodIdentifier methodIdentifier)
 {
     return new Method(methodIdentifier) { IsResolved = false };
 }
Ejemplo n.º 7
0
 public Method(MethodIdentifier identifier)
     : base(identifier)
 {
     Summary = new List<IComment>();
 }