static void Main(string[] args)
        {
            string option = CheckArguments(args);

            arguments = new string[N_ARGS];
            //Initialize static environment configurator
            EnvironmentConfigurator.SetConfiguration();

            switch (option)
            {
            case "version":
                var assembly = System.Reflection.Assembly.GetExecutingAssembly();
                version = FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion;

                Console.WriteLine($"AzureStorageUtilities.PageToBlockMover.BatchWorker V{version}");
                break;

            case "online":
                if (ReadOnlineArguments(args[1]))
                {
                    MainExecution();
                }
                else
                {
                    LogUpdate("Unable to read configuration from the cloud. Terminating.");
                }
                break;

            default:    //direct
                SetArguments(args);
                MainExecution();
                break;
            }
        }
Beispiel #2
0
 private static void MainExecution(string[] args)
 {
     EnvironmentConfigurator.SetConfiguration();
     //Params
     try
     {
         Console.WriteLine("Page2Block batch creator started...");
         ReadArguments(args);
         Execute();
     }
     catch
     {
         ReportError("Invalid Parameters. Check http://warnov.com/@page2block for use instructions");
         End();
     }
 }