Ejemplo n.º 1
0
 internal static INamespaceTypeDefinition GetNamespaceType(IUnitNamespace unitNamespace, IName typeName)
 {
     foreach (INamespaceMember nm in unitNamespace.GetMembersNamed(typeName, false))
     {
         if (nm is INamespaceTypeDefinition)
         {
             return(nm as INamespaceTypeDefinition);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
 internal static IGlobalMethodDefinition GetGlobalMethod(IUnitNamespace unitNamespace, IName methodName)
 {
     foreach (INamespaceMember nm in unitNamespace.GetMembersNamed(methodName, false))
     {
         if (nm is IGlobalMethodDefinition)
         {
             return(nm as IGlobalMethodDefinition);
         }
     }
     return(null);
 }
Ejemplo n.º 3
0
        internal static IUnitNamespace GetNamespace(IUnit unit, params IName[] nameList)
        {
            IUnitNamespace unitNamespace = unit.UnitNamespaceRoot;

            for (int i = 0; i < nameList.Length; ++i)
            {
                foreach (INamespaceMember nsm in unitNamespace.GetMembersNamed(nameList[i], false))
                {
                    unitNamespace = nsm as IUnitNamespace;
                    if (unitNamespace == null)
                    {
                        break;
                    }
                }
            }
            return(unitNamespace);
        }
Ejemplo n.º 4
0
 internal static IGlobalFieldDefinition GetGlobalField(IUnitNamespace unitNamespace, IName fieldName) {
   foreach (INamespaceMember nm in unitNamespace.GetMembersNamed(fieldName, false)) {
     if (nm is IGlobalFieldDefinition)
       return nm as IGlobalFieldDefinition;
   }
   return null;
 }
Ejemplo n.º 5
0
 internal static INamespaceTypeDefinition GetNamespaceType(IUnitNamespace unitNamespace, IName typeName) {
   foreach (INamespaceMember nm in unitNamespace.GetMembersNamed(typeName, false)) {
     if (nm is INamespaceTypeDefinition)
       return nm as INamespaceTypeDefinition;
   }
   return null;
 }