public static async Task Main(string[] args)
        {
            if (string.IsNullOrEmpty(s_connectionString) && args.Length > 0)
            {
                s_connectionString = args[0];
            }

            using var registryManager = RegistryManager.CreateFromConnectionString(s_connectionString);

            var sample = new AutomaticDeviceManagementSample(registryManager);

            await sample.RunSampleAsync().ConfigureAwait(false);

            Console.WriteLine("Done.\n");
        }
Exemplo n.º 2
0
        public static int Main(string[] args)
        {
            if (string.IsNullOrEmpty(s_connectionString) && args.Length > 0)
            {
                s_connectionString = args[0];
            }

            RegistryManager registryManager = RegistryManager.CreateFromConnectionString(s_connectionString);

            var sample = new AutomaticDeviceManagementSample(registryManager);

            sample.RunSampleAsync().GetAwaiter().GetResult();

            Console.WriteLine("Done.\n");
            return(0);
        }