Exemple #1
0
 private RoutineSymbol ImportMethod(MethodInfo method)
 {
     var elem = new RoutineSymbol();
     if (ImportDictionary.ContainsKey(method))
     {
         return (RoutineSymbol)ImportDictionary[method];
     }
     ImportDictionary.Add(method, elem);
     var attribute = new List<AttributeSymbol>();
     AppendEmbededAttribute(attribute, method);
     var generic = CreateGenericList(method.GetGenericArguments());
     var arguments = CreateArgumentList(method);
     var rt = ImportType(method.ReturnType);
     elem.Initialize(method.Name, RoutineType.Routine, TokenType.Unknoun, attribute, generic, arguments, rt);
     return elem;
 }
Exemple #2
0
 private RoutineSymbol ImportProperty(MethodInfo prop, string name)
 {
     var elem = new RoutineSymbol();
     if (ImportDictionary.ContainsKey(prop))
     {
         return (RoutineSymbol)ImportDictionary[prop];
     }
     ImportDictionary.Add(prop, elem);
     var attribute = new List<AttributeSymbol>();
     AppendEmbededAttribute(attribute, prop);
     var generic = new List<GenericSymbol>();
     var arguments = CreateArgumentList(prop);
     var rt = ImportType(prop.ReturnType);
     elem.Initialize(name, RoutineType.Routine, TokenType.Unknoun, attribute, generic, arguments, rt);
     return elem;
 }
Exemple #3
0
 private RoutineSymbol ImportConstructor(ConstructorInfo ctor)
 {
     var elem = new RoutineSymbol();
     if (ImportDictionary.ContainsKey(ctor))
     {
         return (RoutineSymbol)ImportDictionary[ctor];
     }
     ImportDictionary.Add(ctor, elem);
     var attribute = new List<AttributeSymbol>();
     AppendEmbededAttribute(attribute, ctor);
     var generic = new List<GenericSymbol>();
     var arguments = CreateArgumentList(ctor);
     var rt = ImportType(ctor.DeclaringType);
     elem.Initialize(RoutineSymbol.ConstructorIdentifier, RoutineType.Routine, TokenType.Unknoun, attribute, generic, arguments, rt);
     return elem;
 }