예제 #1
0
 public BaseOperations(Uri baseUri, string coreName, IHttpHelper httpHelper)
 {
     _httpHelper = httpHelper ?? new StatelessHttpHelper();
     CoreUri     = new Uri(string.Format("{0}/{1}/", baseUri.ToString().TrimEnd('/'), coreName));
     SelectUri   = new Uri(CoreUri + "select/");
     UpdateUri   = new Uri(CoreUri + "update/");
 }
예제 #2
0
 public CountryController(IHttpContextAccessor httpContextAccessor, ICountryService countryService,
                          IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions) : base(httpContextAccessor)
 {
     _countryService = countryService;
     _httpHelper     = httpHelper;
     _pagerOptions   = pagerOptions.Value;
 }
 public DessertViewModelManager(IHttpHelper httpHelper, IPictureService pictureService, IDessertService dessertService)
 {
     _httpHelper = httpHelper;
     _pictureService = pictureService;
     _dessertService = dessertService;
     HomePageModelMapper.Init();
 }
예제 #4
0
 public WebListener(
     IHttpHelper httpHelper,
     IUrlStrategyFactory urlStrategyFactory)
 {
     _httpHelper         = httpHelper;
     _urlStrategyFactory = urlStrategyFactory;
 }
예제 #5
0
        public async Task Setup()
        {
            #region Configuration classes

            var fixture = new ConfigurationFixture();
            configurationBuilder = fixture.GenerateConfiguration();
            _radarrClient        = fixture.radarrClient;

            #endregion

            #region Database Con++text

            _mediaDbContext = fixture.GetDbContext();
            if (!_mediaDbContext.Request.Any())
            {
                _mediaDbContext.Request.Add(new Domain.UserRequest {
                    Id = 1, MovieId = "577922", UserId = "bacbb67d-819e-4e7b-bb29-c81ff99b5d1d"
                });
                await _mediaDbContext.SaveChangesAsync();
            }

            #endregion

            #region Http Helper
            _httpHelper = new HttpHelper(fixture.ServicePath, fixture.ApiKeys, fixture.radarrClient, fixture.tmdbClient);
            #endregion

            _mediator = A.Fake <IMediator>();
        }
예제 #6
0
        public DashboardViewModelBuilder(IEnumerable <IViewModelBuilder> viewModelBuilderCollection, IHtmlHelper htmlHelper, IHttpHelper httpHelper, ICookieHelper cookieHelper)
        {
            if (viewModelBuilderCollection == null)
            {
                throw new ArgumentNullException(nameof(viewModelBuilderCollection));
            }
            if (htmlHelper == null)
            {
                throw new ArgumentNullException(nameof(htmlHelper));
            }
            if (httpHelper == null)
            {
                throw new ArgumentNullException(nameof(httpHelper));
            }
            if (cookieHelper == null)
            {
                throw new ArgumentNullException(nameof(cookieHelper));
            }

            IViewModelBuilder[] viewModelBuilderArray = viewModelBuilderCollection.ToArray();

            _newsToInformationViewModelBuilder = viewModelBuilderArray.OfType <IViewModelBuilder <InformationViewModel, INews> >().Single();
            _systemErrorViewModelBuilder       = viewModelBuilderArray.OfType <IViewModelBuilder <SystemErrorViewModel, ISystemError> >().Single();
            _dashboardSettingsViewModelBuilder = viewModelBuilderArray.OfType <IViewModelBuilder <DashboardSettingsViewModel, IDashboardSettings> >().Single();
            _redditAuthenticatedUserToObjectViewModelBuilder = viewModelBuilderArray.OfType <IViewModelBuilder <ObjectViewModel <IRedditAuthenticatedUser>, IRedditAuthenticatedUser> >().Single();
            _redditSubredditToObjectViewModelBuilder         = viewModelBuilderArray.OfType <IViewModelBuilder <ObjectViewModel <IRedditSubreddit>, IRedditSubreddit> >().Single();
            _redditLinkToInformationViewModelBuilder         = viewModelBuilderArray.OfType <IViewModelBuilder <InformationViewModel, IRedditLink> >().Single();
            _htmlHelper   = htmlHelper;
            _httpHelper   = httpHelper;
            _cookieHelper = cookieHelper;
        }
예제 #7
0
 public SpiderBase(IHttpHelper http, SpiderConfig config, SaveMessage saveMessage)
 {
     this.Http        = http;
     this.htmlParser  = new HtmlParser();
     this.Config      = config;
     this.SaveMessage = saveMessage;
 }
 public LGooglePlusManager(string consumerKey, string consumerSecret, string accessToken, string refreshToken, DateTime? accessTokenExpiration, IHttpHelper httpHelper)
     : this(consumerKey, consumerSecret, httpHelper)
 {
     this.AccessToken = accessToken;
     this.RefreshToken = refreshToken;
     this.AccessTokenExpirationTime = accessTokenExpiration;
 }
예제 #9
0
 public WebListener(
     IHttpHelper httpHelper,
     IUrlStrategyFactory urlStrategyFactory)
 {
     _httpHelper = httpHelper;
     _urlStrategyFactory = urlStrategyFactory;
 }
예제 #10
0
        public static bool Procesar(Parameters input, IHttpHelper http, bool ejecutarCasosNegocio)
        {
            bool status  = true;
            int  proceso = 0;

            foreach (var fileItem in input.ProcessFiles)
            {
                proceso++;
                Console.WriteLine("\n-------------------------------- Proceso {0} Iniciado  ({1})--------------------------------", proceso, fileItem.CasosNegocio.Name);
                try
                {
                    ProcesarCasos(input, fileItem, http, ejecutarCasosNegocio);
                }
                catch (Exception ex)
                {
                    status = false;
                    Console.WriteLine("\nERROR:");
                    Console.WriteLine(ex.Message);
                    resumen.Add(string.Format("Proceso {0} ({1})", proceso, fileItem.CasosNegocio.Name));
                    resumen.Add("\t" + ex.Message);

                    if (ex.InnerException != null)
                    {
                        Console.WriteLine(ex.InnerException.Message);
                        resumen.Add("\t" + ex.InnerException.Message);
                    }
                }
                PublishSummary();
                Console.WriteLine("\n-------------------------------- Proceso {0} Finalizado  ({1})--------------------------------", proceso, fileItem.CasosNegocio.Name);
            }

            return(status);
        }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContactClient"/> class.
 ///   This parametrized constructore does accept a "ready to use" http-requester.
 ///   This way you can specify a requester with properties that differ from
 ///   default/config-file properties.
 /// </summary>
 /// <param name="preconfiguredHttpHelper">
 /// the preconfigured http-helper class
 /// </param>
 public ContactClient(HttpHelper preconfiguredHttpHelper)
 {
     this.xingRequester  = preconfiguredHttpHelper;
     this.vCardConverter = new VCardConverter {
         HttpRequester = this.xingRequester
     };
 }
예제 #12
0
 public ParallelOperations(Uri baseUri, string coreName, IHttpHelper httpHelper = null, long readSplitSize = 1000,
                           long writeSplitSize = 1000)
     : base(baseUri, coreName, httpHelper)
 {
     _readSplitSize  = readSplitSize;
     _writeSplitSize = writeSplitSize;
 }
 public UserAuthorizationPolicyController(IHttpContextAccessor httpContextAccessor,
                                          IUserAuthorizationPolicyService userAuthorizationPolicyService, IHttpHelper httpHelper,
                                          IOptions <PagerOptions> pagerOptions) : base(httpContextAccessor)
 {
     _httpHelper = httpHelper;
     _userAuthorizationPolicyService = userAuthorizationPolicyService;
     _pagerOptions = pagerOptions.Value;
 }
예제 #14
0
 public PingHttpPostService(IPingRepository pingRepository, IPingWebRequestHelper pingWebRequestHelper,
                            IBlogSiteRepository blogSiteRepository, IHttpHelper httpHelper)
 {
     _pingRepository = pingRepository;
     _pingWebRequestHelper = pingWebRequestHelper;
     _blogSiteRepository = blogSiteRepository;
     _httpHelper = httpHelper;
 }
예제 #15
0
 public UserStatusController(IHttpContextAccessor httpContextAccessor, IUserStatusService userStatusService,
                             IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _userStatusService = userStatusService;
     _httpHelper        = httpHelper;
     _pagerOptions      = pagerOptions.Value;
 }
 public ArticleCategoryController(IArticleCategoryService articleCategoryService,
                                  IHttpContextAccessor httpContextAccessor, IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _httpHelper             = httpHelper;
     _articleCategoryService = articleCategoryService;
     _pagerOptions           = pagerOptions.Value;
 }
예제 #17
0
 public HelpersManager(IEmailHelper emailHelper, IEnvironmentHelper environmentHelper, IHttpHelper httpHelper, ILoggerWrapper loggerWrapper, ICacheHelper cacheHelper)
 {
     EmailHelper       = emailHelper;
     EnvironmentHelper = environmentHelper;
     HttpHelper        = httpHelper;
     Log   = loggerWrapper;
     Cache = cacheHelper;
 }
예제 #18
0
 public FarmTypeController(IFarmTypeService farmTypeService, IHttpContextAccessor httpContextAccessor, IHttpHelper httpHelper,
                           IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _httpHelper      = httpHelper;
     _farmTypeService = farmTypeService;
     _pagerOptions    = pagerOptions.Value;
 }
예제 #19
0
 public HomeController(IHttpHelper helper, ILogger <HomeController> logger, XMLParser xMLParser,
                       Repository repository)
 {
     _httpHelper = helper;
     _logger     = logger;
     _xmlParser  = xMLParser;
     _repository = repository;
 }
예제 #20
0
 public ProductController(IProductService productService, IHttpHelper httpHelper,
                          IHttpContextAccessor httpContextAccessor, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _httpHelper     = httpHelper;
     _productService = productService;
     _pagerOptions   = pagerOptions.Value;
 }
예제 #21
0
 public ShortcutController(IShortcutService shortcutService,
                           IHttpContextAccessor httpContextAccessor, IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _httpHelper      = httpHelper;
     _shortcutService = shortcutService;
     _pagerOptions    = pagerOptions.Value;
 }
 public AjaxGetController(ApplicationDbContext context, IRepositoryPedido repositoryPedido,
                          IRepositoryPagina repositoryPagina, IHttpHelper httpHelper)
 {
     db = context;
     RepositoryPedido = repositoryPedido;
     RepositoryPagina = repositoryPagina;
     HttpHelper       = httpHelper;
 }
예제 #23
0
 public RssResult(PostListViewModel model)
     : base("application/rss+xml")
 {
     _view = model;
     if (_view == null) return;
     _httpHelper = ObjectFactory.GetInstance<IHttpHelper>();
     _feed = new SyndicationFeed(_view.BlogTitle, _view.SubHead, HttpContext.Current.Request.Url, BuildItems());
 }
 public TwitterApiAdapter(ITwitterApiRequestFactory twitterApiRequestFactory,
                          IHttpHelper webRequestHelper,
                          IObjectSerializer objectSerializer)
 {
     _twitterApiRequestFactory = twitterApiRequestFactory;
     _webRequestHelper         = webRequestHelper;
     _objectSerializer         = objectSerializer;
 }
 public SentimentApiAdapter(IObjectSerializer objectSerializer,
                            ISentimentRequestFactory sentimentRequestFactory,
                            IHttpHelper httpHelper)
 {
     _sentimentRequestFactory = sentimentRequestFactory;
     _httpHelper       = httpHelper;
     _objectSerializer = objectSerializer;
 }
 public RoleAuthorizationPolicyController(IHttpContextAccessor httpContextAccessor,
                                          IRoleAuthorizationPolicyService roleAuthorizationPolicyService, IHttpHelper httpHelper,
                                          IOptions <PagerOptions> pagerOptions) : base(httpContextAccessor)
 {
     _roleAuthorizationPolicyService = roleAuthorizationPolicyService;
     _httpHelper   = httpHelper;
     _pagerOptions = pagerOptions.Value;
 }
예제 #27
0
 public AuthorizationPolicyController(IAuthorizationPolicyService authorizationPolicyService, IHttpContextAccessor httpContextAccessor,
                                      IUserManager <ApplicationUser> userManager, IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _userManager = userManager;
     _httpHelper  = httpHelper;
     _authorizationPolicyService = authorizationPolicyService;
     _pagerOptions = pagerOptions.Value;
 }
예제 #28
0
 public RoleController(IRoleService roleService, IHttpContextAccessor httpContextAccessor,
                       IApplicationRoleManager <ApplicationRole> roleManager, IHttpHelper httpHelper, IOptions <PagerOptions> pagerOptions)
     : base(httpContextAccessor)
 {
     _httpHelper   = httpHelper;
     _roleService  = roleService;
     _roleManager  = roleManager;
     _pagerOptions = pagerOptions.Value;
 }
예제 #29
0
        public BlogMLService(IHttpHelper httpHelper, IStreamHelper streamHelper, 
                             IImportRepository importRepository, IBlogMLMappingService blogMLMappingService)
        {
            _httpHelper = httpHelper;
            _streamHelper = streamHelper;

            _importRepository = importRepository;
            _blogMLMappingService = blogMLMappingService;
        }
예제 #30
0
        public CookieHelper(IHttpHelper httpHelper)
        {
            if (httpHelper == null)
            {
                throw new ArgumentNullException("httpHelper");
            }

            this.httpHelper = httpHelper;
        }
 public PedidoRepository(IConfiguration configuration,
                         ApplicationContext contexto,
                         IHttpContextAccessor contextAccessor,
                         IHttpHelper sessionHelper,
                         ICadastroRepository cadastroRepository) : base(configuration, contexto)
 {
     this.contextAccessor    = contextAccessor;
     this.httpHelper         = sessionHelper;
     this.cadastroRepository = cadastroRepository;
 }
 public RepositoryPedido(IConfiguration configuration, ApplicationDbContext contexto,
                         IRepositoryDiv repositoryDiv,
                         IHttpHelper httpHelper, IHostingEnvironment hostingEnvironment,
                         IUserHelper userHelper) : base(configuration, contexto)
 {
     RepositoryDiv      = repositoryDiv;
     HttpHelper         = httpHelper;
     HostingEnvironment = hostingEnvironment;
     UserHelper         = userHelper;
 }
예제 #33
0
 /// <summary>
 /// Client wrapper to interact with eos blockchains.
 /// </summary>
 /// <param name="config">Configures client parameters</param>
 public EosBase(EosConfigurator config, IHttpHelper httpHelper)
 {
     EosConfig = config;
     if (EosConfig == null)
     {
         throw new ArgumentNullException("config");
     }
     Api           = new EosApi(EosConfig, httpHelper);
     AbiSerializer = new AbiSerializationProvider(Api);
 }
 public RepositoryRequisicao(IConfiguration configuration, ApplicationDbContext contexto,
                             IHttpHelper httpHelper, IHttpContextAccessor ContextAccessor,
                             UserManager <IdentityUser> userManager, IRepositoryCadastro repositoryCadastro)
     : base(configuration, contexto)
 {
     HttpHelper         = httpHelper;
     contextAccessor    = ContextAccessor;
     UserManager        = userManager;
     RepositoryCadastro = repositoryCadastro;
 }
 public LGooglePlusManager(string consumerKey, string consumerSecret, IHttpHelper t)
 {
     this.ConsumerKey = consumerKey;
     this.ConsumerSecret = consumerSecret;
     this.ProviderType = AccountOAuth.OAuthTypes.Google;
     this.HttpHelper = t;
     if (null == ServicePointManager.ServerCertificateValidationCallback)
     {
         ServicePointManager.ServerCertificateValidationCallback = CertValidator.Validator;
     }
 }
예제 #36
0
        public RaceRepository(IHttpHelper httpHelper, IConfiguration config)
        {
            _httpHelper = httpHelper;
            _config     = config;

            _endpoint = string.Format("{0}/{1}?name={2}",
                                      _config["Endpoints:baseUrl"],
                                      _config["Endpoints:racesUrl"],
                                      _config["AppName"]
                                      );
        }
예제 #37
0
 public PedidoRepository(IConfiguration configuration,
                         ApplicationContext contexto,
                         IHttpContextAccessor contextAccessor,
                         IHttpHelper sessionHelper,
                         ICadastroRepository cadastroRepository, UserManager <AppIdentityUser> userManager) : base(configuration, contexto)
 {
     this.contextAccessor    = contextAccessor;
     this.httpHelper         = sessionHelper;
     this.cadastroRepository = cadastroRepository;
     this.userManager        = userManager;
 }
예제 #38
0
 public WebWorkContext(
     HttpContextBase httpContext,
     IHttpHelper httpHelper,
     IUserDataService userService,
     IAuthenticationService authenticationService)
 {
     this.httpContext = httpContext;
     this.httpHelper = httpHelper;
     this.userService = userService;
     this.authenticationService = authenticationService;
 }
예제 #39
0
 public UrlStrategyImgur(Uri uri, IHttpHelper httpHelper)
     : base(new Uri(
         uri.AbsoluteUri
             .Replace("i.imgur.com", "imgur.com")
             .Replace(".jpg", string.Empty)
             .Replace(".jpeg", string.Empty)
             .Replace(".gif", string.Empty)
             .Replace(".png", string.Empty)
         ))
 {
     _httpHelper = httpHelper;
 }
예제 #40
0
 public PostService(
     IPostRepository postRepository,
     IBlogSiteRepository blogSiteRepository,
     IPostMappingService postMappingService,
     IHttpHelper httpHelper,
     IProfileUserRepository profileUserRepository,
     IHttpHelper helper,
     IBlogsSiteMappingService blogsSiteMappingService,
     IPingHttpPostService pingHttpPostService,
     ISearchEngineService searchEngineService)
 {
     _postRepository = postRepository;
     _blogSiteRepository = blogSiteRepository;
     _postMappingService = postMappingService;
     _httpHelper = httpHelper;
     _profileUserRepository = profileUserRepository;
     _helper = helper;
     _blogsSiteMappingService = blogsSiteMappingService;
     _pingHttpPostService = pingHttpPostService;
     _searchEngineService = searchEngineService;
 }
예제 #41
0
 public UrlStrategySpotify(Uri uri, IHttpHelper helper)
     : base(uri)
 {
     _helper = helper;
 }
 public void Init()
 {
     _helper = Substitute.For<IHttpHelper>();
     _target = new UrlStrategyAftonbladet(Arg.Any<Uri>(), _helper);
 }
예제 #43
0
 public UploadService(IHttpHelper httpHelper)
 {
     _httpHelper = httpHelper;
 }
예제 #44
0
        protected override void SetUp()
        {
            base.SetUp();

            _httpHelper = new HttpHelper();
        }
예제 #45
0
 public SiteMapResult(List<PostViewModel> model)
     : base("text/xml")
 {
     _view = model;
     _httpHelper = ObjectFactory.GetInstance<IHttpHelper>();
 }
예제 #46
0
 public UrlStrategyFactory(IHttpHelper httpHelper)
 {
     _httpHelper = httpHelper;
 }
예제 #47
0
 public UrlStrategyAftonbladet(Uri uri, IHttpHelper helper)
     : base(uri)
 {
     _helper = helper;
 }
예제 #48
0
 public UrlStrategyYoutube(Uri uri, IHttpHelper httpHelper)
     : base(uri)
 {
     _httpHelper = httpHelper;
 }
예제 #49
0
 public void SetUp()
 {
     _helper = Substitute.For<IHttpHelper>();
 }
예제 #50
0
 public UrlStrategyDefault(Uri uri, IHttpHelper httpHelper)
     : base(uri)
 {
     _httpHelper = httpHelper;
 }