示例#1
0
 public ErrorHandlingMiddleware(
     RequestDelegate next,
     ILoggingHelper loggingHelper,
     IExceptionHelper exceptionHelper,
     IOptions <ResponseExceptionHandlerOptions> options)
 {
     this.next                      = next;
     this.exceptionHelper           = exceptionHelper;
     this.loggingHelper             = loggingHelper;
     this.options                   = options.Value;
     this.clearCacheHeadersDelegate = this.ClearCacheHeaders;
 }
 public ThirdPartyFileProcessUtility(IMessageBroker <AddressLocationUSRDTO> messageBroker,
                                     IFileMover fileMover, IExceptionHelper exceptionHelper,
                                     ILoggingHelper loggingHelper,
                                     IConfigurationHelper configHelper)
 {
     this.msgBroker     = messageBroker;
     this.fileMover     = fileMover;
     this.loggingHelper = loggingHelper;
     this.configHelper  = configHelper;
     this.xsdLocation   = configHelper.ReadAppSettingsConfigurationValues(ThirdPartyLoaderConstants.XSDLOCATIONCONFIG);
     this.processed     = configHelper.ReadAppSettingsConfigurationValues(ThirdPartyLoaderConstants.USRPROCESSEDFILEPATHCONFIG);
     this.error         = configHelper.ReadAppSettingsConfigurationValues(ThirdPartyLoaderConstants.USRERRORFILEPATHCONFIG);
 }
        public NYBFileProcessUtility(IHttpHandler httpHandler, IConfigurationHelper configurationHelper, ILoggingHelper loggingHelper, IExceptionHelper exceptionHelper)
        {
            this.httpHandler      = httpHandler;
            this.strFMOWebAPIName = configurationHelper != null?configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.FMOWebAPIName).ToString() : string.Empty;

            this.loggingHelper        = loggingHelper;
            this.exceptionHelper      = exceptionHelper;
            this.strProcessedFilePath = configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.ProcessedFilePath);
            this.strErrorFilePath     = configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.ErrorFilePath);
            noOfCharacters            = configurationHelper != null?Convert.ToInt32(configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.NoOfCharactersForNYB)) : default(int);

            maxCharacters = configurationHelper != null?Convert.ToInt32(configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.MaxCharactersForNYB)) : default(int);

            csvValues = configurationHelper != null?Convert.ToInt32(configurationHelper.ReadAppSettingsConfigurationValues(NYBLoaderConstants.CsvValuesForNYB)) : default(int);
        }
 public SearchAPIFacade(
     IDataContractJsonSerializerWrapper dataContractJsonSerializerWrapper,
     IExceptionHelper exceptionHelper,
     IConfiguration configuration,
     IWebAPIRequestWrapper webAPIRequestWrapper,
     IResponseStreamHelper responseStreamHelper)
 {
     _dataContractJsonSerializerWrapper = dataContractJsonSerializerWrapper;
       _exceptionHelper = exceptionHelper;
       _configuration = configuration;
       _webAPIRequestWrapper = webAPIRequestWrapper;
       _responseStreamHelper = responseStreamHelper;
       _breeds = new List<Breed>();
       _dogs = new PageableResults<Dog>();
 }
 public WebAPIRequestWrapper(IExceptionHelper exceptionHelper)
 {
     _exceptionHelper = exceptionHelper;
 }
 public void SetupTests()
 {
     _exceptionHandler = MockRepository.GenerateMock<IExceptionHelper>();
     _webAPIRequestWrapper = MockRepository.GenerateMock<IWebAPIRequestWrapper>();
     _configMgr = MockRepository.GenerateMock<IConfiguration>();
     _responseStreamHelper = MockRepository.GenerateMock<IResponseStreamHelper>();
     _configMgr.Stub(x => x.GetWebAPIUrl()).Return("http://www.someAPI.com");
 }