public EnvironmentDeployedGetter( ITfsClient tfsClient, IConfigurationRetriever configurationRetriever) { _tfsClient = tfsClient; _configurationRetriever = configurationRetriever; }
public RouteDefinitionMatcher(IConfigurationRetriever configurationRetriever, IOptions <GatewayOptions> gatewayOptions) { _configurationRetriever = configurationRetriever; _gatewayOptions = gatewayOptions.Value; _asyncLock = new AsyncLock(); }
public RestDbManager(IConfigurationRetriever configurationRetriever, IOptions <RestDbOptions> restDbOptions) { _configurationRetriever = configurationRetriever; _restDbOptions = restDbOptions.Value; _connections = new ConcurrentDictionary <string, RestDbConnection>(); }
public GoogleDriveServerSyncProvider(IConfigurationRetriever configurationRetriever, IGoogleDriveService googleDriveService, ILogManager logManager, IHttpClient httpClient) { _configurationRetriever = configurationRetriever; _googleDriveService = googleDriveService; _httpClient = httpClient; _logger = logManager.GetLogger("GoogleDrive"); }
public DropboxServerSyncProvider(IConfigurationRetriever configurationRetriever, IDropboxApi dropboxApi, IDropboxContentApi dropboxContentApi, ILogManager logManager) { _configurationRetriever = configurationRetriever; _dropboxApi = dropboxApi; _dropboxContentApi = dropboxContentApi; _logger = logManager.GetLogger("Dropbox"); }
public ReleaseEnvironmentsGetter( ITfsClient tfsClient, IConfigurationRetriever configurationRetriever) { _tfsClient = tfsClient; _configurationRetriever = configurationRetriever; }
public OpenIdConnectCachingSecurityTokenProvider(string metadataEndpoint, IConfigurationRetriever <OpenIdConnectConfiguration> retriever) { _metadataEndpoint = metadataEndpoint; _configManager = new ConfigurationManager <OpenIdConnectConfiguration>(metadataEndpoint, new OpenIdConnectConfigurationRetriever()); RetrieveMetadata(); }
public OneDriveServerSyncProvider(IConfigurationRetriever configurationRetriever, IOneDriveApi oneDriveApi, ILiveAuthenticationApi liveAuthenticationApi, IHttpClient httpClient, ILogManager logManager) { _configurationRetriever = configurationRetriever; _oneDriveApi = oneDriveApi; _liveAuthenticationApi = liveAuthenticationApi; _httpClient = httpClient; _logger = logManager.GetLogger("OneDrive"); }
public OneDriveCredentials(IConfigurationRetriever configurationRetriever, ILiveAuthenticationApi liveAuthenticationApi, SyncTarget target) { _configurationRetriever = configurationRetriever; _liveAuthenticationApi = liveAuthenticationApi; _syncAccountId = target.Id; var syncAccount = configurationRetriever.GetSyncAccount(target.Id); _accessToken = syncAccount.AccessToken; }
public HealthCheckPerformer( ITfsClient tfsClient, IConfigurationRetriever configurationRetriever, IMemoryCache memoryCache) { _tfsClient = tfsClient; _configurationRetriever = configurationRetriever; _memoryCache = memoryCache; }
public void Initialize() { _configurationRetriever = A.Fake <IConfigurationRetriever>(); var options = Options.Create(new GatewayOptions { RouteDefinitionsUri = "./test.json" }); _routeDefinitionMatcher = new RouteDefinitionMatcher(_configurationRetriever, options); }
/// <summary> /// Instantiates a new <see cref="ConfigurationManager{T}"/> with cinfiguration validator that manages automatic and controls refreshing on configuration data. /// </summary> /// <param name="metadataAddress">The address to obtain configuration.</param> /// <param name="configRetriever">The <see cref="IConfigurationRetriever{T}"/></param> /// <param name="docRetriever">The <see cref="IDocumentRetriever"/> that reaches out to obtain the configuration.</param> /// <param name="configValidator">The <see cref="IConfigurationValidator{T}"/></param> /// <exception cref="ArgumentNullException">If 'configValidator' is null.</exception> public ConfigurationManager(string metadataAddress, IConfigurationRetriever <T> configRetriever, IDocumentRetriever docRetriever, IConfigurationValidator <T> configValidator) : this(metadataAddress, configRetriever, docRetriever) { if (configValidator == null) { throw LogHelper.LogArgumentNullException(nameof(configValidator)); } _configValidator = configValidator; }
public MockerMiddleware(IConfigurationRetriever configurationRetriever, IHistoryRepository historyRepository, IOptions <MockerOptions> mockerOptions, RequestDelegate next) { _configurationRetriever = configurationRetriever; _historyRepository = historyRepository; _mockerOptions = mockerOptions.Value; _next = next; }
public ReleaseInfoCoordinator( IReleaseEnvironmentsGetter releaseEnvironmentsGetter, IEnvironmentDeployedGetter environmentDeployedGetter, IConfigurationRetriever configurationRetriever) { _releaseEnvironmentsGetter = releaseEnvironmentsGetter; _environmentDeployedGetter = environmentDeployedGetter; _configurationRetriever = configurationRetriever; _targetSystems = new List <TargetSystem>(); }
public void Initialize() { _configurationRetriever = A.Fake <IConfigurationRetriever>(); _historyRepository = A.Fake <IHistoryRepository>(); var options = Options.Create(new MockerOptions { RouteDefinitionsUri = "http://test-host/mocker.json" }); _next = A.Fake <RequestDelegate>(); _mockerMiddleware = new MockerMiddleware(_configurationRetriever, _historyRepository, options, _next); }
/// <summary> /// Initializes the traversing with the XmlSchema. /// </summary> /// <param name="sourceFile">The schema file to traverse.</param> /// <returns>An <c>IVisitableComponent</c> containing all the visitable nodes.</returns> public IVisitableComponent Traverse(string sourceFile) { try { Validator val = new Validator(); using (FileStream fs = new FileStream(sourceFile, FileMode.Open)) _context = System.Xml.Schema.XmlSchema.Read(fs, new ValidationEventHandler(val.OnValidation)); if (val.HasErrors) { throw new ArgumentException("There were errors in the schema " + sourceFile + Environment.NewLine + val.Errors); } } catch (Exception ex) { throw new ArgumentException("The schema couldn't be loaded: " + sourceFile + Environment.NewLine + ex.Message, ex); } // Retrieve the current configuration from the Host. IConfigurationRetriever retriever = (IConfigurationRetriever)Host.GetService(typeof(IConfigurationRetriever)); if (retriever == null) { GeneratorHost.ThrowInvalidHostResponse(typeof(IConfigurationRetriever)); } _config = retriever.GetConfig("generator") as GeneratorSection; if (_config == null) { GeneratorHost.ThrowInvalidHostResponse("No <generator> section retrieved."); } if (!_context.IsCompiled) { _context.Compile(null); } XmlDocument doc = new XmlDocument(); doc.Load(sourceFile); VisitableSchemaRoot result = new VisitableSchemaRoot(_context, doc, _context.Id); foreach (XmlSchemaObject item in _context.Items) { if (item is XmlSchemaElement) { result.Add(Build(item as XmlSchemaElement, result)); } } return(result); }
private async Task <ClaimsIdentity> RunTestCase(IConfigurationRetriever <IDictionary <string, HashSet <string> > > configRetriever, string[] requiredEndorsements = null) { var tokenExtractor = new JwtTokenExtractor( emptyClient, EmulatorValidation.ToBotFromEmulatorTokenValidationParameters, AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl, AuthenticationConstants.AllowedSigningAlgorithms, new ConfigurationManager <IDictionary <string, HashSet <string> > >("http://test", configRetriever)); string header = $"Bearer {await new MicrosoftAppCredentials(EnvironmentConfig.TestAppId(), EnvironmentConfig.TestAppPassword()).GetTokenAsync()}"; return(await tokenExtractor.GetIdentityAsync(header, "testChannel", requiredEndorsements)); }
public ConfigurationManager(IRelyingPartyContextBuilder relyingPartyContextBuilder, IConfigurationRetriever <T> configRetriever) { if (relyingPartyContextBuilder == null) { throw new ArgumentNullException("context"); } if (configRetriever == null) { throw new ArgumentNullException("configRetriever"); } this._relyingPartyContextBuilder = relyingPartyContextBuilder; this._configRetriever = configRetriever; this._refreshLock = new SemaphoreSlim(1); }
/// <summary> /// Instantiaties a new <see cref="ConfigurationManager{T}"/> that manages automatic and controls refreshing on configuration data. /// </summary> /// <param name="metadataAddress">The address to obtain configuration.</param> /// <param name="configRetriever">The <see cref="IConfigurationRetriever{T}"/></param> /// <param name="docRetriever">The <see cref="IDocumentRetriever"/> that reaches out to obtain the configuration.</param> /// <exception cref="ArgumentNullException">If 'metadataAddress' is null or empty.</exception> /// <exception cref="ArgumentNullException">If 'configRetriever' is null.</exception> /// <exception cref="ArgumentNullException">If 'docRetriever' is null.</exception> public ConfigurationManager(string metadataAddress, IConfigurationRetriever <T> configRetriever, IDocumentRetriever docRetriever) { if (string.IsNullOrWhiteSpace(metadataAddress)) { throw LogHelper.LogArgumentNullException(nameof(metadataAddress)); } if (configRetriever == null) { throw LogHelper.LogArgumentNullException(nameof(configRetriever)); } if (docRetriever == null) { throw LogHelper.LogArgumentNullException(nameof(docRetriever)); } _metadataAddress = metadataAddress; _docRetriever = docRetriever; _configRetriever = configRetriever; _refreshLock = new SemaphoreSlim(1); }
/// <summary> /// Instantiaties a new <see cref="ConfigurationManager{T}"/> that manages automatic and controls refreshing on configuration data. /// </summary> /// <param name="metadataAddress">the address to obtain configuration.</param> /// <param name="docRetriever">the <see cref="IDocumentRetriever"/> that reaches out to obtain the configuration.</param> public ConfigurationManager(string metadataAddress, IDocumentRetriever docRetriever) { if (!typeof(T).Equals(typeof(WsFederationConfiguration)) && (!typeof(T).Equals(typeof(OpenIdConnectConfiguration)))) { throw new NotImplementedException(typeof(T).FullName); } if (string.IsNullOrWhiteSpace(metadataAddress)) { throw new ArgumentNullException("metadataAddress"); } if (docRetriever == null) { throw new ArgumentNullException("retriever"); } _metadataAddress = metadataAddress; _docRetriever = docRetriever; _configRetriever = GetConfigurationRetriever(); _refreshLock = new SemaphoreSlim(1); }
public UnitOfWorkFactory(IConfigurationRetriever configurationRetriever) { this._configRetriever = configurationRetriever; }
public OneDriveRestfulService(IConfigurationRetriever configurationRetriever, ILiveAuthenticationApi liveAuthenticationApi) { _configurationRetriever = configurationRetriever; _liveAuthenticationApi = liveAuthenticationApi; }
public FederationConfigurationManager(IAssertionPartyContextBuilder federationPartyContextBuilder, IConfigurationRetriever <MetadataBase> configRetriever) : base(federationPartyContextBuilder, configRetriever) { }
public GoogleDriveRestfulService2(IConfigurationRetriever configurationRetriever, IGoogleAuthService googleAuthService, IGoogleDriveService googleDriveService) { _configurationRetriever = configurationRetriever; _googleAuthService = googleAuthService; _googleDriveService = googleDriveService; }
public DropboxRestfulService(IConfigurationRetriever configurationRetriever, IDropboxApi dropboxApi) { _configurationRetriever = configurationRetriever; _dropboxApi = dropboxApi; }
public DataRetriever(IConfigurationRetriever configRetriever) { _configRetriever = configRetriever; }
/// <summary> /// Instantiaties a new <see cref="ConfigurationManager{T}"/> that manages automatic and controls refreshing on configuration data. /// </summary> /// <param name="metadataAddress">The address to obtain configuration.</param> /// <param name="configRetriever">The <see cref="IConfigurationRetriever{T}"/></param> /// <param name="httpClient">The client to use when obtaining configuration.</param> public ConfigurationManager(string metadataAddress, IConfigurationRetriever <T> configRetriever, HttpClient httpClient) : this(metadataAddress, configRetriever, new HttpDocumentRetriever(httpClient)) { }
public TfsClient(IConfigurationRetriever configurationRetriever) { _configurationRetriever = configurationRetriever; }
/// <summary> /// Initializes a new instance of <see cref="ConfigurationManagerStub" /> /// </summary> /// <param name="metadataAddress">The address to obtain configuration.</param> /// <param name="configRetriever">The <see cref="IConfigurationRetriever{OpenIdConnectConfiguration}" /></param> /// <param name="docRetriever">The <see cref="IDocumentRetriever" /> that reaches out to obtain the configuration.</param> public ConfigurationManagerStub( string metadataAddress, IConfigurationRetriever <OpenIdConnectConfiguration> configRetriever, IDocumentRetriever docRetriever) { }