public SchedulingAgent(IRequestValidator validator, IRevaleeClientSettings clientSetting, IHttpContextAccessor context)
        {
            _validator     = validator;
            _clientSetting = clientSetting;
            _context       = context?.HttpContext;

            _LazyHttpClient = new Lazy <HttpClient>(() => InitializeHttpClient(GetWebRequestTimeout()), true);
        }
Esempio n. 2
0
        private static string BuildConfiguredServiceBase(IRevaleeClientSettings config)
        {
            Uri configuredServiceBaseUri = config.ServiceBaseUri;

            if (configuredServiceBaseUri == null)
            {
                return(new UriBuilder(ServiceBaseUriKeys.DEFAULT_SERVICE_SCHEME, ServiceBaseUriKeys.DFAULT_SERVICE_HOST, ServiceBaseUriKeys.DEFAULT_HTTP_PORT_NUMBER).ToString());
            }

            return(configuredServiceBaseUri.ToString());
        }
 public RequestValidator(IRevaleeClientSettings revaleeClientSettings)
 {
     _revaleeClientSettings = revaleeClientSettings;
 }
Esempio n. 4
0
 /// <summary>Initializes a new instance of the <see cref="T:Revalee.Client.ServiceBaseUri" /> class with the configured identifier.</summary>
 /// <exception cref="T:System.UriFormatException">The configured value is not valid as a service base Uri for the Revalee service.</exception>
 internal ServiceBaseUri(IRevaleeClientSettings config)
     : base(BuildConfiguredServiceBase(config), UriKind.Absolute)
 {
 }