//public static TokenRequest Create() //{ // return new TokenRequest() // { // grant_type = "password", // password = Constants.API_PASSWORD, // username = Constants.API_LOGIN // }; //} public static FormUrlEncodedContent AsContent(IAPIConfigService config) { return(new FormUrlEncodedContent(new[] { new KeyValuePair <string, string>("grant_type", "password"), new KeyValuePair <string, string>("password", config.Password), new KeyValuePair <string, string>("username", config.Username) })); }
public APIHttpClientService( IProxyService proxyService, IAPIConfigService configService ) { this.proxyService = proxyService ?? throw new System.ArgumentNullException(nameof(proxyService)); this.configService = configService ?? throw new System.ArgumentNullException(nameof(configService)); }
public ElasticDBContext(IAPIConfigService config) { var settings = new ConnectionSettings(new Uri(config.DbConnectionString)) .DefaultMappingFor <FTPPath>(m => m.IndexName("ftp-path")) .DefaultMappingFor <FTPEntry>(m => m.IndexName("ftp-entry")) .DefaultMappingFor <TenderPlanIndex>(m => m.IndexName("tender-plan-index")); Client = new ElasticClient(settings); }
public APIDataProviderService( IAPIConfigService configService, IAPIHttpClientService httpClientService, ILoggerService logger ) { this.configService = configService ?? throw new ArgumentNullException(nameof(configService)); this.httpClientService = httpClientService ?? throw new ArgumentNullException(nameof(httpClientService)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public PathService(IAPIConfigService Config, IFTPPathRepo FtpPathRepo) { config = Config ?? throw new ArgumentNullException(nameof(Config)); ftpPathRepo = FtpPathRepo ?? throw new ArgumentNullException(nameof(FtpPathRepo)); }
public ProxyService( IAPIConfigService configService ) { this.configService = configService ?? throw new ArgumentNullException(nameof(configService)); }
public MongoDbContext(IAPIConfigService config, ILoggerService logger) { _config = config ?? throw new System.ArgumentNullException(nameof(config)); _logger = logger ?? throw new System.ArgumentNullException(nameof(logger)); }