public WikipediaClient(HttpClient client, IReadOnlyPolicyRegistry <string> policyRegistry) { client.BaseAddress = new Uri("https://en.wikipedia.org"); _client = client; _cachePolicy = policyRegistry.Get <IAsyncPolicy <HttpResponseMessage> >("WikipediaCachePolicy"); }
public NewDeckOfCardsCommandHandler(ILogger <NewDeckOfCardsCommandHandler> logger, IDocumentStore db, IMapper mapper, IReadOnlyPolicyRegistry <string> registry) { _logger = logger; _db = db; _mapper = mapper; _policyRegistry = registry; }
public JsonPlaceholderClient(HttpClient httpClient, IReadOnlyPolicyRegistry <string> policyRegistry) { _httpClient = httpClient; // Resolve the caching policy to be used with this client _cachePolicy = policyRegistry.Get <AsyncCachePolicy <string> >("jsonPlaceHolderClientCachePolicy"); }
public UserStore( IdentityDbContext context, IReadOnlyPolicyRegistry <string> policyRegistry) { _context = context; _policyRegistry = policyRegistry; }
public ChaosPolicyStore( OperationDbContext context, IReadOnlyPolicyRegistry <string> policyRegistry) { _context = context; _policyRegistry = policyRegistry; }
public ObterCursosGsaGoogleQueryHandler(IMediator mediator, IReadOnlyPolicyRegistry <string> registry, GsaSyncOptions gsaSyncOptions) : base() { this.mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); this.gsaSyncOptions = gsaSyncOptions; this.policy = registry.Get <IAsyncPolicy>(PoliticaPolly.PolicyGoogleSync); }
public TestClient(ITestConfiguration configuration, HttpClient client, IReadOnlyPolicyRegistry <string> policyRegistry, ILogger <TestClient> logger) { _client = client; _policyRegistry = policyRegistry; _logger = logger; _client.BaseAddress = new Uri(configuration.BaseAddress); }
public InativarAlunoGoogleCommandHandler(IMediator mediator, IReadOnlyPolicyRegistry <string> registry, VariaveisGlobaisOptions variaveisGlobais) : base(variaveisGlobais) { this.mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); this.policy = registry.Get <IAsyncPolicy>(PoliticaPolly.PolicyGoogleSync); }
public CachedTeamListingDataSource(IReadOnlyPolicyRegistry <string> policyRegistry, ICacheableTeamListingDataSource teamListingDataSource, ITeamListingFilterSerializer teamListingFilterSerializer, ICacheOverride cacheOverride) { _policyRegistry = policyRegistry ?? throw new ArgumentNullException(nameof(policyRegistry)); _teamListingDataSource = teamListingDataSource ?? throw new ArgumentNullException(nameof(teamListingDataSource)); _teamListingFilterSerializer = teamListingFilterSerializer ?? throw new ArgumentNullException(nameof(teamListingFilterSerializer)); _cacheOverride = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride)); }
public DistanceModule(IConfiguration configuration, IReadOnlyPolicyRegistry <string> registry) { AirportServiceUri = new Uri(configuration["ExternalServices:0:AirportServiceUri"]); Registry = registry; Get("api/distance/{from:iata}-{to:iata}", GetDistance); }
public CircuitBreakerPolicyStore( OperationDbContext context, IReadOnlyPolicyRegistry <string> policyRegistry) { _context = context; _policyRegistry = policyRegistry; }
public CachedCompetitionDataSource(IReadOnlyPolicyRegistry <string> policyRegistry, ICacheableCompetitionDataSource competitionDataSource, ICompetitionFilterSerializer competitionFilterSerializer, ICacheOverride cacheOverride) { _policyRegistry = policyRegistry ?? throw new ArgumentNullException(nameof(policyRegistry)); _competitionDataSource = competitionDataSource ?? throw new ArgumentNullException(nameof(competitionDataSource)); _competitionFilterSerializer = competitionFilterSerializer ?? throw new ArgumentNullException(nameof(competitionFilterSerializer)); _cacheOverride = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride)); }
public ClientStore( ConfigurationDbContext context, IReadOnlyPolicyRegistry <string> policyRegistry) { _context = context; _policyRegistry = policyRegistry; }
public RemoteStoreHttpClient( [NotNull] HttpClient client, IReadOnlyPolicyRegistry <string> policyRegistry) { _client = client; _cachePolicy = policyRegistry.Get <IAsyncPolicy <TTenantInfo> >(typeof(TTenantInfo).Name); }
public CachedMatchLocationDataSource(IReadOnlyPolicyRegistry <string> policyRegistry, ICacheableMatchLocationDataSource matchLocationDataSource, IMatchLocationFilterSerializer matchLocationFilterSerializer, ICacheOverride cacheOverride) { _policyRegistry = policyRegistry ?? throw new ArgumentNullException(nameof(policyRegistry)); _matchLocationDataSource = matchLocationDataSource ?? throw new ArgumentNullException(nameof(matchLocationDataSource)); _matchLocationFilterSerializer = matchLocationFilterSerializer ?? throw new ArgumentNullException(nameof(matchLocationFilterSerializer)); _cacheOverride = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride)); }
public Pump( IReadOnlyPolicyRegistry <string> policyRegistry, IStreamReader streamReader ) { _policyRegistry = policyRegistry; _streamReader = streamReader; }
public WikiDataClient(HttpClient client, IReadOnlyPolicyRegistry <string> policyRegistry, ILogger <WikiDataClient> logger) { client.BaseAddress = new Uri("https://www.wikidata.org"); this.Client = client; this.cachePolicy = policyRegistry.Get <IAsyncPolicy <HttpResponseMessage> >("WikiDataCachePolicy"); this.logger = logger; }
public FaceController(IRequisicaoService requisicao, ILogger <FaceController> logger, IReadOnlyPolicyRegistry <string> policyRegistry) { _configurationService = configurationService; _requisicaoService = requisicao; _policyRegistry = policyRegistry; _logger = logger; }
/// <summary> /// Creates a policy to use for an HTTP request. /// </summary> /// <param name="registry">The policy registry to use.</param> /// <param name="request">The HTTP request to get the policy for.</param> /// <returns> /// The policy to use for <paramref name="request"/>. /// </returns> private static IAsyncPolicy <HttpResponseMessage> GetRequestPolicy( IReadOnlyPolicyRegistry <string> registry, HttpRequestMessage request) { string policyName = request.Method == HttpMethod.Get ? "ReadPolicy" : "WritePolicy"; return(registry.Get <IAsyncPolicy <HttpResponseMessage> >(policyName)); }
public BuggyController( IReadOnlyPolicyRegistry <string> registry, TripwireHealthCheck tripWireHealthCheck, ForcedHealthCheck forcedHealthCheck) { this.registry = registry; this.healthCheck = tripWireHealthCheck; this.forcedHealthCheck = forcedHealthCheck; }
private IAsyncPolicy <HttpResponseMessage> PolicySelector(IReadOnlyPolicyRegistry <string> policyRegistry, HttpRequestMessage request) { if (request.Method == HttpMethod.Get) { return(policyRegistry.Get <IAsyncPolicy <HttpResponseMessage> >("SimpleRetry")); } return(policyRegistry.Get <IAsyncPolicy <HttpResponseMessage> >("NoOp")); }
public WidgetDeprecatedAwsSnsNotificationHandler(AmazonSimpleNotificationServiceClient snsClient, IConfiguration config, ILogger <WidgetDeprecatedAwsSnsNotificationHandler> logger, IReadOnlyPolicyRegistry <string> registry) { _snsClient = snsClient; _config = config; _logger = logger; _policyRegistry = registry; }
public UsersController(IConfiguration _config, ILogger <UsersController> logger, IReadOnlyPolicyRegistry <string> policyRegistry) { config = _config; //RECEBE AS MENSAGENS ENVIAS POR NÒS COMO TESTE //new UserReceive().ReceiveMessages(); _logger = logger; _policyRegistry = policyRegistry; }
public AdvancedCircuitBreakerHealth(IReadOnlyPolicyRegistry <string> registry) { if (registry == null) { throw new ArgumentNullException(nameof(registry)); } _circuitBreakerPolicy = registry.Get <AsyncCircuitBreakerPolicy <HttpResponseMessage> >(PolicyConstants.ADVANCED_CIRCUITBREAKER_POLICY_NAME); }
public Battery(IConsole console, List <IHowitzer> howitzers, IReadOnlyPolicyRegistry <string> policyRegistry) { _console = console; _howitzers = howitzers; _policyRegistry = policyRegistry; foreach (var howitzer in _howitzers) { howitzer.AssignToBattery(this); } }
public CardTemplateQueryHandler(ILogger <CardTemplateQueryHandler> logger, IDocumentStore context, IMapper mapper, ISieveProcessor sieveProc, IOptions <SieveOptions> sortFilterPagingOptions, IReadOnlyPolicyRegistry <string> registry) { _logger = logger; _docStore = context; _mapper = mapper; _sortFilterPagingProcessor = sieveProc; _sortFilterPagingOptions = sortFilterPagingOptions; _policyRegistry = registry; }
public UserProfileController(IGetCurrentUser getCurrentUser, IUserProfileService userProfileService, ILogger <UserProfileController> logger, ICacheManagementFactory cacheMgmtFactory, IReadOnlyPolicyRegistry <string> cachePolicyRegistry) { this.getCurrentUser = getCurrentUser; this.userProfileService = userProfileService; this.logger = logger; this.cacheMgmtFactory = cacheMgmtFactory; this.cachePolicyRegistry = cachePolicyRegistry; }
public SeniorBatteryOfficer( DivisionControlUnit.DivisionControlUnitClient client, IBattery battery, IConsole console, IReadOnlyPolicyRegistry <string> policyRegistry) { _client = client; _battery = battery; _console = console; _policyRegistry = policyRegistry; }
public ExternalSiteContentController( IReadOnlyPolicyRegistry <string> policyRegistry, IWebsiteService websiteService, ISentimentAnalysisService sentimentAnalysisService, ILogger <ExternalSiteContentController> logger) { _policy = policyRegistry.Get <IAsyncPolicy <AnalysisResponse> >(Policies.AnalysisResponsePolicy); _websiteService = websiteService; _sentimentAnalysisService = sentimentAnalysisService; _logger = logger; }
public Howitzer( int howitzerId, IConsole console, IReadOnlyPolicyRegistry <string> policyRegistry, DivisionControlUnit.DivisionControlUnitClient client) { _console = console; _policyRegistry = policyRegistry; _client = client; Id = howitzerId; }