Skip to content

Instantly share code, notes, and snippets.

@janmechtel
Created January 20, 2021 07:53
Show Gist options
  • Save janmechtel/d1ffb11f5907c7e9f4455b612f9794c4 to your computer and use it in GitHub Desktop.
Save janmechtel/d1ffb11f5907c7e9f4455b612f9794c4 to your computer and use it in GitHub Desktop.
static void Run(Expression<Action> action) {
System.Console.WriteLine("================================================");
var method = action.Body as MethodCallExpression;
if(method != null)
Console.WriteLine(method.Method.Name);
System.Console.WriteLine("================================================");
System.Console.WriteLine("");
action.Compile().Invoke();
System.Console.WriteLine("------------------------------------------------");
System.Console.WriteLine("");
}
static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
if (args.Length > 0)
{
string path = args[0];
Console.WriteLine("Trying path: " + path);
if (!Directory.Exists(path))
{
Console.WriteLine("Path not found, using debug path instead");
}
else
{
BaseDirectory = path;
}
}
Run(() => parseFolderTree());
templates = JsonConvert. DeserializeObject(System.IO.File.ReadAllText(Path.Combine(BaseDirectory, @"Models\Template.json")));
#if !DEBUG
Run(() => copyTemplatesIntoFolders());
Run(() => createContentZips());
#endif
Run(() => createFoldersXLSOverview());
Run(() => createDataSourcesXLS());
Run(() => createBindingsXLS());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment