Beispiel #1
0
        public HyperVController(string hyperVServerName, string login, string password)
        {
            ServerName = hyperVServerName;
            Login      = login ?? string.Empty;
            Password   = password ?? string.Empty;

            HyperVRemoteOptions configuration = new HyperVRemoteOptions {
                HyperVServerName = ServerName, HyperVUserName = Login, HyperVUserPassword = Password
            };

            _provider = new HyperVProvider(configuration);
        }
Beispiel #2
0
        public static IServiceCollection AddHyperVRemote(this IServiceCollection services, Action <HyperVRemoteOptions> configure)
        {
            var options = new HyperVRemoteOptions();

            if (configure != null)
            {
                services.AddOptions();
                services.Configure <HyperVRemoteOptions>(configure);
            }

            services.AddTransient <IHyperVProvider, HyperVProvider>();
            return(services);
        }