static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLine.Parser.Default.ParseArguments(args, options))
            {
                if (options.Verbose)
                {
                    Console.WriteLine("Filename: {0}", options.MetadataFilePath);
                }
            }
            else
            {
                var usage = options.GetUsage();
                Console.WriteLine(usage);
                Console.ReadLine();
                return;
            }

            using (new InformationLogEventWriter())
            {
                ApplicationConfiguration.RegisterDependencyResolver(() => new UnityDependencyResolver());
                ApplicationConfiguration.RegisterServerInitialiserFactory(() => new ServerInitialiser());
                var task = Initialisation.Init();
                task.Wait();
            }

            var metadataTask = Program.CreateMetadata(options);

            metadataTask.Wait();
            Console.WriteLine("Press enter to exit.");
            Console.ReadLine();
        }
Beispiel #2
0
 public static async Task Init()
 {
     await Initialisation.InitializeServer();
 }