public Config(string[] args) { if (!IsValid(args)) { throw new ArgumentException(nameof(args)); } DirectoryPath = args[0]; OutputFileName = args.Length > 1 ? args[1] : "bundle.cs"; if (!OutputFileName.EndsWith(".cs")) { OutputFileName = OutputFileName + ".cs"; } if (DirectoryPath.EndsWith("\\") || DirectoryPath.EndsWith("/")) { DirectoryPath = DirectoryPath.TrimEnd('/', '\\').Replace("/", "\\"); } }