UnityEditor.CodeStrippingUtils.GetClassNames C# (CSharp) Method

GetClassNames() private static method

private static GetClassNames ( IEnumerable classIds ) : HashSet
classIds IEnumerable
return HashSet
        private static HashSet<string> GetClassNames(IEnumerable<int> classIds)
        {
            HashSet<string> set = new HashSet<string>();
            IEnumerator<int> enumerator = classIds.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    int current = enumerator.Current;
                    set.Add(BaseObjectTools.ClassIDToString(current));
                }
            }
            finally
            {
                if (enumerator == null)
                {
                }
                enumerator.Dispose();
            }
            return set;
        }

Usage Example

示例#1
0
        private static HashSet <string> GetRequiredStrippableModules(HashSet <string> nativeClasses)
        {
            HashSet <string> stringSet = new HashSet <string>();

            foreach (string moduleName in ModuleMetadata.GetModuleNames())
            {
                if (ModuleMetadata.GetModuleStrippable(moduleName))
                {
                    HashSet <string> classNames = CodeStrippingUtils.GetClassNames((IEnumerable <int>)ModuleMetadata.GetModuleClasses(moduleName));
                    if (nativeClasses.Overlaps((IEnumerable <string>)classNames))
                    {
                        stringSet.Add(moduleName);
                    }
                }
            }
            return(stringSet);
        }
All Usage Examples Of UnityEditor.CodeStrippingUtils::GetClassNames