public VirtualArsenalFilesLocatorService(IConfigurationService configurationService, IDirectoryWrapper directoryWrapper, IEnvironmentWrapper environmentWrapper, IFileWrapper fileWrapper) { _configurationService = configurationService; _directoryWrapper = directoryWrapper; _environmentWrapper = environmentWrapper; _fileWrapper = fileWrapper; }
public WebConfigTransformBuildpack( IEnvironmentWrapper environmentWrapper, IConfigurationFactory configurationFactory, IFileWrapper fileWrapper, IXmlDocumentWrapper xmlDocumentWrapper) { _environmentWrapper = environmentWrapper; _configurationFactory = configurationFactory; _fileWrapper = fileWrapper; _xmlDocumentWrapper = xmlDocumentWrapper; }
public LambdaService(IEnvironmentWrapper env, IResponseWrapper responseWrapper, IDynamoDbContextWrapper dynamoDbContext, IAmazonApiGatewayManagementApi apiGatewayManagementApi, IAmazonIotData amazonIotData) { _env = env; _responseWrapper = responseWrapper; _dynamoDbContext = dynamoDbContext; _apiGatewayManagementApi = apiGatewayManagementApi; _amazonIotData = amazonIotData; }
public ConnectionParamProvider(IEnvironmentWrapper env) { HostName = env.GetValue("hostname", "localhost"); if (!int.TryParse(env.GetValue("port", ""), out int port)) { port = 1; } Port = port; VirtualHost = env.GetValue("virtualhost", "/"); ExchangeName = env.GetValue("exchangename", "DefaultExchange"); QueueName = env.GetValue("queuename", "DefaultQueue");; RoutingKey = env.GetValue("RoutingKey", ""); }
public Implementation(IArgs options, Config implConfig) { _options = options; _logger = implConfig.ExecutionLoggerFactory.New(new JsonSerializer(), new WebSocketPool()); _writer = implConfig.Writer; _filePath = implConfig.FilePath; _environment = implConfig.EnvironmentWrapper; _serverProxyFactory = implConfig.ServerProxyFactory; _resourceCatalogProxyFactory = implConfig.ResourceCatalogProxyFactory; _workerContextFactory = implConfig.WorkerContextFactory; _triggersCatalogFactory = implConfig.TriggersCatalogFactory; _fileSystemWatcherFactory = implConfig.FileSystemWatcherFactory; _queueWorkerImplementationFactory = implConfig.QueueWorkerImplementationFactory; }
public void ApplyXmlTransformation(string buildPath, IEnvironmentWrapper environmentWrapper, IWebConfigWriter webConfigWriter) { if (webConfigWriter == null) { throw new ArgumentNullException(nameof(webConfigWriter), "WebConfig writer is required"); } var transformationKey = environmentWrapper.GetEnvironmentVariable(Constants.XML_TRANSFORM_KEY_NM) ?? "Release"; var transformFilePath = Path.Combine(buildPath, $"web.{transformationKey}.config"); if (File.Exists(transformFilePath)) { webConfigWriter.ExecuteXmlTransformation(transformFilePath); } }
internal Option <string> ParseURI(string uri, IEnvironmentWrapper env) { Option <string> parsedURI = Option.None <string>(); Match matchHost = ImageUpstreamRegex.Match(uri); if (matchHost.Success && (matchHost.Groups["post"]?.Length > 0)) { string hostAddress = env.GetVariable(Core.Constants.GatewayHostnameVariableName). Expect(() => new InvalidOperationException($"Could not find environment variable: {Core.Constants.GatewayHostnameVariableName}")); parsedURI = Option.Some(matchHost.Groups["pre"].Value + hostAddress + matchHost.Groups["post"].Value); } return(parsedURI); }
internal static string ValidateAndGetImage(string image, IEnvironmentWrapper env) { image = Preconditions.CheckNonWhiteSpace(image, nameof(image)).Trim(); if (image[0] == '$') { Match matchHost = ImageUpstreamRegex.Match(image); if (matchHost.Success && (matchHost.Groups["path"]?.Length > 0)) { string hostAddress = env.GetVariable(Core.Constants.GatewayHostnameVariableName). Expect(() => new InvalidOperationException($"Could not find environment variable: {Core.Constants.GatewayHostnameVariableName}")); image = hostAddress + matchHost.Groups["path"].Value; } else { throw new ArgumentException($"Image {image} is not in the right format.If your intention is to use an environment variable, check the port is specified."); } } Match match = ImageRegex.Match(image); if (match.Success) { if (match.Groups["tag"]?.Length > 0) { return(image); } else { return(Invariant($"{image}:{Constants.DefaultTag}")); } } else { throw new ArgumentException($"Image {image} is not in the right format"); } }
public FieldValueProvider(IEnvironmentWrapper environmentWrapper, IClock clock, IPickleIdStore pickleIdStore) { _environmentWrapper = environmentWrapper; _clock = clock; _pickleIdStore = pickleIdStore; }
public ConfigurationTracer(IEnvironmentWrapper environmentWrapper, IConfigurationFactory configurationFactory, ILogger logger) { _configuration = configurationFactory.GetConfiguration(environmentWrapper.GetEnvironmentVariable(Constants.ASPNETCORE_ENVIRONMENT_NM) ?? "Release"); this.environmentWrapper = environmentWrapper; _logger = logger; }
public AnalyticsEventProvider(IUserUniqueIdStore userUniqueIdStore, UnitTestProviderConfiguration unitTestProviderConfiguration, IEnvironmentWrapper environmentWrapper) { _userUniqueIdStore = userUniqueIdStore; _environmentWrapper = environmentWrapper; _unitTestProvider = unitTestProviderConfiguration.UnitTestProvider; }
public SqlStreamReaderBuilder(IEnvironmentWrapper environmentWrapper) { this.environmentWrapper = environmentWrapper; }
public ProtobufFileNameResolver(ITestRunContext testRunContext, IEnvironmentWrapper environmentWrapper) { _testRunContext = testRunContext; _environmentWrapper = environmentWrapper; }
public Function(IEnvironmentWrapper env, IAuthorizerFacade authorizerFacade) { _env = env; _authorizerFacade = authorizerFacade; }
public FileProbe(IEnvironmentWrapper environment, IFileSystemWrapper fileSystem, IHasher hasher) { this.environment = environment; this.fileSystem = fileSystem; this.hasher = hasher; }
public LambdaService(IEnvironmentWrapper env, IDynamoDBContext dynamoDbContext) { _env = env; _dynamoDbContext = dynamoDbContext; }
public ConfigReader(IReporter reporter, IFileSystem fileSystem, IEnvironmentWrapper environmentWrapper) { this.reporter = reporter; this.fileSystem = fileSystem; this.environmentWrapper = environmentWrapper; }
private Implementation.Config SetupQueueWorkerImplementationConfings(out Mock <IWriter> mockWriter, out Mock <IExecutionLogPublisher> mockExecutionLogPublisher, IEnvironmentConnection environmentConnection, IResourceCatalogProxy resourceCatalogProxy, IWorkerContextFactory workerContextFactory, ITriggersCatalog triggersCatalog, IFilePath filePath, IFileSystemWatcherFactory fileSystemWatcherFactory, IQueueWorkerImplementationFactory queueWorkerImplementationFactory, IEnvironmentWrapper environmentWrapper) { mockWriter = new Mock <IWriter>(); mockExecutionLogPublisher = new Mock <IExecutionLogPublisher>(); var mockExecutionLoggerFactory = new Mock <IExecutionLoggerFactory>(); mockExecutionLoggerFactory.Setup(o => o.New(It.IsAny <ISerializer>(), It.IsAny <IWebSocketPool>())).Returns(mockExecutionLogPublisher.Object); var mockResourceCatalogProxyFactory = new Mock <IResourceCatalogProxyFactory>(); mockResourceCatalogProxyFactory.Setup(o => o.New(environmentConnection)).Returns(resourceCatalogProxy); var mockServerProxyFactory = new Mock <IServerProxyFactory>(); mockServerProxyFactory.Setup(o => o.New(new Uri("https://localhost:3143/"))).Returns(environmentConnection); var mockTriggersCatalogFactory = new Mock <ITriggersCatalogFactory>(); mockTriggersCatalogFactory.Setup(o => o.New()).Returns(triggersCatalog); var implConfig = new Implementation.Config { EnvironmentWrapper = environmentWrapper, ExecutionLoggerFactory = mockExecutionLoggerFactory.Object, FilePath = filePath, FileSystemWatcherFactory = fileSystemWatcherFactory, QueueWorkerImplementationFactory = queueWorkerImplementationFactory, ResourceCatalogProxyFactory = mockResourceCatalogProxyFactory.Object, ServerProxyFactory = mockServerProxyFactory.Object, TriggersCatalogFactory = mockTriggersCatalogFactory.Object, WorkerContextFactory = workerContextFactory, Writer = mockWriter.Object }; return(implConfig); }
private Logger(string name) { _environmentWrapper = EnvironmentWrapper.Instance; _name = name; }
public LambdaService(IEnvironmentWrapper env, IResponseWrapper responseWrapper) { _env = env; _responseWrapper = responseWrapper; }
internal PathWrapper(ICakeLog log, IEnvironmentWrapper environmentWrapper) { _log = log; _environmentWrapper = environmentWrapper; }
public FunctionTests() { _env = EnvironmentWrapper.Instance; _authorizerFacade = new Mock <IAuthorizerFacade>(); _testObject = new Function(_env, _authorizerFacade.Object); }
public FileProbe(IEnvironmentWrapper environment, IFileSystemWrapper fileSystem) { this.environment = environment; this.fileSystem = fileSystem; }
public DefaultTestRunContext(IEnvironmentWrapper environmentWrapper) { _environmentWrapper = environmentWrapper; }
public FileProbe(IEnvironmentWrapper environment, IFileSystemWrapper fileSystem) { this.environment = environment; this.fileSystem = fileSystem; }
public TokenConfigService(IEnvironmentWrapper env, IJsonWebKeyService jwkService, IJsonWebKeyClient jwkClient) { _env = env; _jwkService = jwkService; _jwkClient = jwkClient; }