| 15 | } |
| 16 | |
| 17 | private CodeAnalysis(string[] args) |
| 18 | { |
| 19 | _bIsSingle = bool.Parse(args[0]); |
| 20 | |
| 21 | if (_bIsSingle) |
| 22 | { |
| 23 | _outputPathName = args[1]; |
| 24 | |
| 25 | _inputFileName = args[2]; |
| 26 | |
| 27 | _inputPathNames = new List<string>(); |
| 28 | |
| 29 | if (File.Exists(Path.Combine(_outputPathName, DynamicFileName))) |
| 30 | { |
| 31 | _dynamic = JsonSerializer.Deserialize<Dictionary<string, List<string>>>( |
| 32 | File.ReadAllText(Path.Combine(_outputPathName, DynamicFileName))); |
| 33 | } |
| 34 | else |
| 35 | { |
| 36 | _dynamic = new Dictionary<string, List<string>> |
| 37 | { |
| 38 | ["DynamicClass"] = new List<string>(), |
| 39 | ["DynamicStruct"] = new List<string>(), |
| 40 | ["DynamicEnum"] = new List<string>(), |
| 41 | ["DynamicInterface"] = new List<string>() |
| 42 | }; |
| 43 | } |
| 44 | |
| 45 | if (File.Exists(Path.Combine(_outputPathName, DynamicFileFileName))) |
| 46 | { |
| 47 | _dynamicFile = JsonSerializer.Deserialize<Dictionary<string, string>>( |
| 48 | File.ReadAllText(Path.Combine(_outputPathName, DynamicFileFileName))); |
| 49 | } |
| 50 | else |
| 51 | { |
| 52 | _dynamicFile = new Dictionary<string, string>(); |
| 53 | } |
| 54 | |
| 55 | if (File.Exists(Path.Combine(_outputPathName, OverrideFunctionFileName))) |
| 56 | { |
| 57 | _overrideFunction = JsonSerializer.Deserialize<Dictionary<string, List<string>>>( |
| 58 | File.ReadAllText(Path.Combine(_outputPathName, OverrideFunctionFileName))); |
| 59 | } |
| 60 | else |
| 61 | { |
| 62 | _overrideFunction = new Dictionary<string, List<string>>(); |
| 63 | } |
| 64 | |
| 65 | if (File.Exists(Path.Combine(_outputPathName, OverrideFileFileName))) |
| 66 | { |
| 67 | _overrideFile = JsonSerializer.Deserialize<Dictionary<string, string>>( |
| 68 | File.ReadAllText(Path.Combine(_outputPathName, OverrideFileFileName))); |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | _overrideFile = new Dictionary<string, string>(); |
| 73 | } |
| 74 | |