CollectManagedTypeReferencesFromRoots() private static method

private static CollectManagedTypeReferencesFromRoots ( string directory, string rootAssemblies ) : HashSet
directory string
rootAssemblies string
return HashSet
Example #1
0
        private static HashSet <UnityType> CollectNativeClassListFromRoots(string directory, string[] rootAssemblies, StrippingInfo strippingInfo)
        {
            HashSet <string>        source     = CodeStrippingUtils.CollectManagedTypeReferencesFromRoots(directory, rootAssemblies, strippingInfo);
            IEnumerable <UnityType> collection = from name in source
                                                 select UnityType.FindTypeByName(name) into klass
                                                     where klass != null && klass.baseClass != null
                                                 select klass;

            return(new HashSet <UnityType>(collection));
        }
Example #2
0
        private static HashSet <string> CollectNativeClassListFromRoots(string directory, string[] rootAssemblies)
        {
            HashSet <string> hashSet  = new HashSet <string>();
            HashSet <string> hashSet2 = CodeStrippingUtils.CollectManagedTypeReferencesFromRoots(directory, rootAssemblies);

            foreach (string current in hashSet2)
            {
                int num = BaseObjectTools.StringToClassID(current);
                if (num != -1 && !BaseObjectTools.IsBaseObject(num))
                {
                    hashSet.Add(current);
                }
            }
            return(hashSet);
        }
Example #3
0
        private static HashSet <string> CollectNativeClassListFromRoots(string directory, string[] rootAssemblies)
        {
            HashSet <string> stringSet = new HashSet <string>();

            using (HashSet <string> .Enumerator enumerator = CodeStrippingUtils.CollectManagedTypeReferencesFromRoots(directory, rootAssemblies).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string current = enumerator.Current;
                    int    classId = BaseObjectTools.StringToClassID(current);
                    if (classId != -1 && !BaseObjectTools.IsBaseObject(classId))
                    {
                        stringSet.Add(current);
                    }
                }
            }
            return(stringSet);
        }