Пример #1
0
 private void LoadEnumsFromSourcesFiles(string sourcesDir)
 {
     foreach (var file in Directory.GetFiles(sourcesDir, "*.cs").Where(f => !f.EndsWith(".enums.cs") && !f.EndsWith(".constants.cs")))
     {
         foreach (var enumObj in EnumObject.LoadFromFile(file))
         {
             this.LoadObjMembersIntoMap(enumObj);
         }
     }
 }
Пример #2
0
            private static List <EnumObject> LoadEnumsFromSourceFiles(IEnumerable <string> fileNames)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

                foreach (var file in fileNames)
                {
                    enumObjects.AddRange(EnumObject.LoadFromFile(file));
                }

                return(enumObjects);
            }
Пример #3
0
            private List <EnumObject> LoadEnumsFromJsonFiles(string[] enumJsonFiles)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

                if (enumJsonFiles != null)
                {
                    foreach (var enumJsonFile in enumJsonFiles)
                    {
                        enumObjects.AddRange(EnumObject.LoadFromFile(enumJsonFile));
                    }
                }

                return(enumObjects);
            }
Пример #4
0
            private static List <EnumObject> LoadEnumsFromSourceFiles(string sourcesDir)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

                if (Directory.Exists(sourcesDir))
                {
                    foreach (var file in Directory.GetFiles(sourcesDir, "*.cs"))
                    {
                        enumObjects.AddRange(EnumObject.LoadFromFile(file));
                    }
                }

                return(enumObjects);
            }