Example #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);
         }
     }
 }
Example #2
0
            private static List <EnumObject> LoadEnumsFromSourceFiles(string sourcesDir)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

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

                return(enumObjects);
            }
Example #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);
            }
Example #4
0
            private static List <EnumObject> LoadEnumsFromJsonFiles(string[] enumJsonFiles, Dictionary <string, string> renames)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

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

                return(enumObjects);
            }
Example #5
0
            private List <EnumObject> LoadEnumsFromJsonFiles(string[] enumJsonFiles, Dictionary <string, string> renames)
            {
                List <EnumObject> enumObjects = new List <EnumObject>();

                if (enumJsonFiles != null)
                {
                    var namesToTypes = GetFullNamesToTypes($@"{this.repoRoot}\generation\emitter");

                    foreach (var enumJsonFile in enumJsonFiles)
                    {
                        enumObjects.AddRange(EnumObjectUtils.NormalizeEnumObjects(namesToTypes, EnumObject.LoadFromFile(enumJsonFile), renames));
                    }
                }

                return(enumObjects);
            }