Пример #1
0
        public async Task <IHypervHost> GetHypervHostAsync(string hostName)
        {
            if (_host is null)
            {
                //todo read config  Token=Configuration["somesection:somekey"]

                _host = new HypervHost(hostName, "Administrator", null)
                {
                };
                //await services.ConnectAsync();
            }
            return(_host);
        }
Пример #2
0
        public async Task <IHypervHost> GetHypervHostAsync(string hostName)
        {
            if (_host is null)
            {
                //todo read config  Token=Configuration["somesection:somekey"]

                var options = new HyperVHostOptions
                {
                    HostName = hostName,
                    UserName = "******"
                };

                _host = new HypervHost(Options.Create(options), null);
                //await services.ConnectAsync();
            }
            return(_host);
        }