Пример #1
0
 public MigrationHelper(IFileManager fileManager, IEnvironmentManager environmentManager,
                        IConfiguration configuration)
 {
     _fileManager   = fileManager;
     _configuration = configuration;
     _secretManager = new SecretManager(environmentManager, _fileManager, _configuration);
 }
Пример #2
0
 public SecretManager(IEnvironmentManager environmentManager, IFileManager fileManager,
                      IConfiguration configuration)
 {
     _environmentManager = environmentManager;
     _fileManager        = fileManager;
     _configuration      = configuration;
 }
 public ExternalProcessManager(ITemporaryStorageManager temporaryStorageManager,
                               IEnvironmentManager environmentManager)
 {
     executableSourcePath         = temporaryStorageManager.CreateFilePath("ExternalApp.exe");
     workingDirectoryPath         = temporaryStorageManager.TemporaryDirectoryPath;
     this.temporaryStorageManager = temporaryStorageManager;
     this.environmentManager      = environmentManager;
 }
Пример #4
0
 /// <summary>
 /// Creates an instance of the IdentityApi
 /// </summary>
 /// <param name="httpClient">Sets the HttpClient to be used by the IdentityApi</param>
 /// <param name="environmentManager">Sets the environment to be used by the IdentityApi</param>
 /// <param name="identityClientId">Sets the Identity Client Id to be used by the IdentityApi</param>
 /// <param name="identityClientSecret">Sets the Identity Client Secret to be used by the IdentityApi</param>
 public IdentityApi(HttpClient httpClient, IEnvironmentManager environmentManager,
                    string identityClientId, string identityClientSecret)
 {
     _environmentManager   = environmentManager;
     _httpClient           = httpClient;
     _identityClientId     = identityClientId;
     _identityClientSecret = identityClientSecret;
 }
Пример #5
0
 public ViewServerConnection(IConfiguration configuration, IUserManager userManager, IEnvironmentManager environmentManager, JsonSerializerOptions serializerOptions)
 {
     this._configuration            = configuration;
     this._userManager              = userManager;
     this._environmentManager       = environmentManager;
     this._serializerOptions        = serializerOptions;
     this._userManager.UserChanged += this.UserManager_UserChanged;
 }
Пример #6
0
 public DataFunctions(IUserManager userManager, IEnvironmentManager environmentManager, IObjectCache objectCache, JsonSerializerOptions serializerOptions)
 {
     this._userManager              = userManager;
     this._environmentManager       = environmentManager;
     this._objectCache              = objectCache;
     this._serializerOptions        = serializerOptions;
     this._userManager.UserChanged += this.OnUserChanged;
     this._environmentManager.EnvironmentChanged += this.OnEnvironmentChanged;
 }
        private static ExternalProcessManager CreateExternalProcessManager(ITemporaryStorageManager storageManager,
                                                                           bool is64Bit)
        {
            Mock <IEnvironmentManager> environmentManagerMock = new Mock <IEnvironmentManager>();

            environmentManagerMock.SetupGet(mock => mock.Is64Bit).Returns(is64Bit);
            IEnvironmentManager environmentManager = environmentManagerMock.Object;

            return(new ExternalProcessManager(storageManager, environmentManager));
        }
Пример #8
0
        public VSTalkCore(IWindowsManager windowsManager, IEnvironmentManager environmentManager, IModelContext modelContext)
        {
            WindowsManager = windowsManager;
            EnvironmentManager = environmentManager;
            ModelContext = modelContext;

            NotificationQueue = new NotificationQueue();

            Connector = new ClientConnector(this);
            ControlsRepository = new ControlRepository(this);

            LoadConnections();
        }
Пример #9
0
        public VSTalkCore(IWindowsManager windowsManager, IEnvironmentManager environmentManager, IModelContext modelContext)
        {
            WindowsManager     = windowsManager;
            EnvironmentManager = environmentManager;
            ModelContext       = modelContext;

            NotificationQueue = new NotificationQueue();

            Connector          = new ClientConnector(this);
            ControlsRepository = new ControlRepository(this);

            LoadConnections();
        }
        public IServerEnvironment3 GetServerEnvironment()
        {
            UID uid = new UIDClass();

            uid.Value = "{32D4C328-E473-4615-922C-63C108F55E60}";

            //use activator to cocreate singleton
            Type t = Type.GetTypeFromProgID("esriSystem.EnvironmentManager");

            System.Object       obj = Activator.CreateInstance(t);
            IEnvironmentManager environmentManager = obj as IEnvironmentManager;

            return(environmentManager.GetEnvironment(uid) as IServerEnvironment3);
        }
Пример #11
0
        public ExecutionEnvironment(IEnvironmentManager environment)
        {
            var env = environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");

            if (env.IsNullOrEmpty())
            {
                env = Production;
            }

            EnvironmentName = env;

            // TODO: Directory.GetCurrentDirectory() instead?
            ServiceRootPath = AppContext.BaseDirectory;
        }
Пример #12
0
        public void ConfigureServices(IEnvironmentManager environmentManager, IExecutionEnvironment executionEnvironment, IServiceCollection services, string[] args)
        {
            var basicServicesProvider = services
                                        .AddLogging()
                                        .AddSingleton(environmentManager)
                                        .AddSingleton(executionEnvironment)
                                        .AddDefaultConfiguration(executionEnvironment, args, GetServiceSingleton().GetSwitchMappings())
                                        .BuildServiceProvider();

            Logger = basicServicesProvider.GetService <ILoggerFactory>().AddConsole(LogLevel.Debug, false).CreateLogger("ServiceStartup");

            OnConfigureServices(services, args);
            basicServicesProvider.GetService <IConfiguration>();
            ServiceProvider = services.BuildServiceProvider();
        }
        /**
         * This method returns a Server property value
         */
        public Object GetServerProperty(string propertyName)
        {
            Object propertyValue       = null;
            Type   envMgrType          = Type.GetTypeFromProgID("esriSystem.EnvironmentManager");
            object envMgrObj           = Activator.CreateInstance(envMgrType);
            IEnvironmentManager envMgr = envMgrObj as IEnvironmentManager;
            UID envUID = new UIDClass();

            envUID.Value = "{32D4C328-E473-4615-922C-63C108F55E60}";
            IServerEnvironment2 serverEnvironment = (IServerEnvironment2)envMgr.GetEnvironment(envUID);
            IPropertySet        serverProps       = serverEnvironment.Properties;

            propertyValue = serverProps.GetProperty(propertyName);

            return(propertyValue);
        }
Пример #14
0
 public SecretManager()
 {
     _environmentManager = new EnvironmentManager();
     _fileManager        = new FileManager();
     _configuration      = new ConfigurationManager(_fileManager);
 }
Пример #15
0
 public EnvironmentDataManager(IEnvironmentManager environmentManager)
 {
     _environmentManager = environmentManager;
 }
Пример #16
0
 /// <summary>
 /// Creates an instance of the TokenApi
 /// </summary>
 /// <param name="httpClient">Sets the HttpClient to be used by the TokenApi</param>
 /// <param name="environmentManager">Sets the environment to be used by the TokenApi</param>
 public TokenApi(HttpClient httpClient, IEnvironmentManager environmentManager)
 {
     HttpClient         = httpClient;
     EnvironmentManager = environmentManager;
 }
Пример #17
0
 /// <summary>
 /// Create an instance of the LoanPayApi
 /// </summary>
 /// <param name="httpClient">Sets the HttpClient to be used by the LoanPayApi</param>
 /// <param name="environmentManager">Sets the environment to be used by the LoanPayApi</param>
 public LoanPayApi(HttpClient httpClient, IEnvironmentManager environmentManager)
 {
     _environmentManager = environmentManager;
     HttpClient          = httpClient;
 }
 public OrlenApplicationUpdateStrategy(IConfigurationRoot configurationRoot, IEnvironmentManager environmentManager)
 {
     ConfigurationRoot       = configurationRoot;
     this.environmentManager = environmentManager;
 }
Пример #19
0
 public static void SetEnvironmentManager(IEnvironmentManager environmentManager)
 {
     ProfileFactory.environmentManager = environmentManager;
 }
Пример #20
0
 /// <summary>
 /// Creates an instance of the LoanPayClient
 /// </summary>
 /// <param name="httpClient">Sets the HttpClient to be used by the LoanPayClient</param>
 /// <param name="environmentManager">Sets the environment to be used by the LoanPayClient</param>
 /// <param name="identityClientId">Sets the Identity Client Id to be used by the LoanPayClient</param>
 /// <param name="identityClientSecret">Sets the Identity Client Secret to be used by the LoanPayClient</param>
 public Client(HttpClient httpClient, IEnvironmentManager environmentManager, string identityClientId, string identityClientSecret)
 {
     IdentityApi = new IdentityApi(httpClient, environmentManager, identityClientId, identityClientSecret);
     LoanPayApi  = new LoanPayApi(httpClient, environmentManager);
     TokenApi    = new TokenApi(httpClient, environmentManager);
 }
Пример #21
0
 public EnvironmentsController(IEnvironmentManager environmentManager)
 {
     _environmentManager = environmentManager;
 }
Пример #22
0
 public static void SetEnvironmentManager(IEnvironmentManager environmentManager)
 {
     TemplateFactory.environmentManager = environmentManager;
 }
Пример #23
0
 public EnvironmentController()
 {
     Service.Set <EnvironmentController>(this);
     this.environmentManager = new WindowsEnvironmentManager();
     this.environmentManager.Init();
 }
 public CheckVersionProcess(IConfigurationRoot configurationRoot, IEnvironmentManager environmentManager) : base(configurationRoot, "Checking the files")
 {
     this.environmentManager = environmentManager;
 }
Пример #25
0
 public static string ReplaceEnvValue(this string sourceString, string[] envVariables, IEnvironmentManager environmentManager)
 {
     if (sourceString.IsNullOrEmpty())
     {
         return(string.Empty);
     }
     foreach (var envVariable in envVariables)
     {
         var envValue = environmentManager.GetEnvironmentVariable(envVariable);
         sourceString = sourceString.Replace(string.Format("@{0}@", envVariable), envValue);
     }
     return(sourceString);
 }
Пример #26
0
 public EnvironmentController()
 {
     Service.EnvironmentController = this;
     this.environmentManager       = new AndroidEnvironmentManager();
     this.environmentManager.Init();
 }
 public EnvironmentInfoController(IEnvironmentManager EnvironmentManager)
 {
     _EnvironmentManager = EnvironmentManager;
 }
Пример #28
0
 internal ApplicationPatcher(IEnvironmentManager environmentManager, PatcherConfig patcherConfig)
 {
     _environmentManager = environmentManager;
     _patcherConfig      = patcherConfig;
 }