예제 #1
0
 public FamilyService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
 }
        public CountriesControllerTests()
        {
            var server = new TestServer(new WebHostBuilder()
                                        .UseStartup <StubStartup>());

            _requestProvider = new RequestProvider(server.CreateClient());
        }
예제 #3
0
 public SchedulingService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
 }
예제 #4
0
 public GerritRepoReader(IRequestProvider repoReader)
 {
     _repoReader     = repoReader;
     _jsonSerializer = new JsonSerializer {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     };
 }
예제 #5
0
 public AuthenticationService(
     IRequestProvider request,
     ISettingsService settingsService)
 {
     _request         = request;
     _settingsService = settingsService;
 }
        public void Process(IRequestProvider provider)
        {
            var request = provider.Take();

            var httpRequest = request.HttpRequest;
            var httpResponse = request.HttpResponse;

            Console.WriteLine("Request:" + httpRequest.RawUrl);
            
            // todo:pre filters?
            if (!httpResponse.Completed()) 
            {
                // maybe filter has finished or client has disconnected
                var serializer = LookupSerializer(httpRequest);
                var requestDto = ReadRequestDto(httpRequest, serializer);
                var responseDto = GenerateResponseDto(httpRequest, httpResponse, requestDto);

                // maybe response has already been written to and closed, in which case we don't need to do anything
                if (!httpResponse.Completed())
                {
                    WriteResponseDto(httpResponse, serializer, responseDto);
                }

                // todo:post filters?
            }
        }
예제 #7
0
        public HyperPipe(int poolSize,
                         IRequestProvider <T> requestProvider,
                         IResponseConsumer <T> responseConsumer)
        {
            _requestProvider  = requestProvider;
            _responseConsumer = responseConsumer;

            _easyPool    = new EasyPool <T>(poolSize);
            _multiHandle = CurlNative.Multi.Init();
            if (_multiHandle.IsInvalid)
            {
                throw new Exception("Could not init curl_multi handle.");
            }

            _socketMap = new SocketPollMap();
            _loop      = new Loop();
            _timeout   = _loop.CreateTimer();

            // Explicitly define callback functions to keep them from being GCed.
            _socketCallback = HandleSocket;
            _timerCallback  = StartTimeout;

            Logger.LogDebug($"Set {CURLMoption.SOCKETFUNCTION}.");
            CurlNative.Multi.SetOpt(_multiHandle, CURLMoption.SOCKETFUNCTION, _socketCallback);
            Logger.LogDebug($"Set {CURLMoption.TIMERFUNCTION}.");
            CurlNative.Multi.SetOpt(_multiHandle, CURLMoption.TIMERFUNCTION, _timerCallback);
        }
예제 #8
0
 public StocksService(
     IRequestProvider requestProvider,
     ISettingsService settingsService)
 {
     _requestProvider = requestProvider ?? throw new ArgumentNullException(nameof(requestProvider));
     _settingsService = settingsService ?? throw new ArgumentNullException(nameof(settingsService));
 }
예제 #9
0
 public CatalogDataService(
     IRequestProvider request,
     IBaseCacheStrategy cache)
 {
     _request = request;
     _cache   = cache;
 }
예제 #10
0
 public PluginsController(IModelMapper modelMapper, IPluginAccountant pluginAccountant, IDataSerializer dataSerializer, PluginSettings pluginSettings, IRequestProvider requestProvider)
 {
     _modelMapper      = modelMapper;
     _pluginAccountant = pluginAccountant;
     _dataSerializer   = dataSerializer;
     _pluginSettings   = pluginSettings;
     _requestProvider  = requestProvider;
 }
예제 #11
0
 public UpdatesComponent(IRequestProvider requestProvider, SystemSettings systemSettings, ISettingService settingService, GeneralSettings generalSettings, IDataSerializer dataSerializer)
 {
     _requestProvider = requestProvider;
     _systemSettings  = systemSettings;
     _settingService  = settingService;
     _generalSettings = generalSettings;
     _dataSerializer  = dataSerializer;
 }
예제 #12
0
 public GenreService(
     IRequestProvider requestProvider,
     ISettingsService settingsService
     )
 {
     _requestProvider = requestProvider;
     _settingsService = settingsService;
 }
 public ShoppingCartService(
     IRequestProvider requestProvider,
     ICustomerService customerService,
     INavigationService navigationService)
 {
     _requestProvider   = requestProvider;
     _customerService   = customerService;
     _navigationService = navigationService;
 }
예제 #14
0
 public TeamMemberService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     ITeamMemberFactory teamMemberFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _teamMemberFactory   = teamMemberFactory;
 }
예제 #15
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public IdentityService(
     IRequestProvider requestProvider,
     INavigationService navigationService,
     IAnnouncementSignalService announcementHubService)
 {
     _requestProvider        = requestProvider;
     _navigationService      = navigationService;
     _announcementHubService = announcementHubService;
 }
예제 #16
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public SearchService(
     IRequestProvider requestProvider,
     IFoundUserGroupDataItemFactory foundUserGroupDataItemFactory,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider = requestProvider;
     _foundUserGroupDataItemFactory = foundUserGroupDataItemFactory;
     _identityUtilService           = identityUtilService;
 }
 public PushNotificationService(
     INavigationService navigationService,
     IRequestProvider requestProvider,
     ITripsService tripsService)
 {
     _navigationService = navigationService;
     _requestProvider   = requestProvider;
     _tripsService      = tripsService;
 }
예제 #18
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public FriendService(
     IRequestProvider requestProvider,
     IProfileService profileService,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _profileService      = profileService;
     _identityUtilService = identityUtilService;
 }
예제 #19
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public ProfileMediaService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     IMediaFactory mediaFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _mediaFactory        = mediaFactory;
 }
        public FinishSignUpViewModel(INavigationService navigationService,
                                     IRequestProvider requestProvider,
                                     IAuthenticationService authenticationService, IPlatformService platformService) : base(navigationService)
        {
            this.requestProvider       = requestProvider;
            this.authenticationService = authenticationService;
            this.platformService       = platformService;

            GoToInboxCommand = new Command(GoToInboxCommandExecute);
        }
예제 #21
0
 public WatchedFile(ILog log, IEntityProvider entityLocator, IFile file, IRequestProvider requestProvider, IEnvironmentUtility environmentUtility, IDirectory directory)
 {
     // TODO: Dependency injection feels like it is bloating the constructor. Might be time to re-address the responsibility of this classes methods.
     _log                = log;
     _entityLocator      = entityLocator;
     _file               = file;
     _requestProvider    = requestProvider;
     _environmentUtility = environmentUtility;
     _directory          = directory;
 }
예제 #22
0
 public WatchedFile(ILog log, IEntityProvider entityLocator, IFile file, IRequestProvider requestProvider, IEnvironmentUtility environmentUtility, IDirectory directory)
 {
     // TODO: Dependency injection feels like it is bloating the constructor. Might be time to re-address the responsibility of this classes methods.
     _log = log;
     _entityLocator = entityLocator;
     _file = file;
     _requestProvider = requestProvider;
     _environmentUtility = environmentUtility;
     _directory = directory;
 }
예제 #23
0
 public MovieService(
     IRequestProvider requestProvider,
     ISettingsService settingService,
     IGenreService genreService
     )
 {
     _requestProvider = requestProvider;
     _settingsService = settingService;
     _genreService    = genreService;
     _genresCache     = new Lazy <Task <IEnumerable <Genre> > >(async() => await _genreService.GetGenresAsync());
 }
 public ArticlePageModel(IRequestProvider requestProvider,
                         ISettingsService settingsService, IUserDialogs userDialogs,
                         IFontDependDevice fontDependDevice,
                         ICommentsService commentsService)
 {
     _requestProvider  = requestProvider;
     _settingsService  = settingsService;
     _userDialogs      = userDialogs;
     _fontDependDevice = fontDependDevice;
     _commentsService  = commentsService;
 }
예제 #25
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public TeamService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     ITeamFactory teamFactory,
     IProfileFactory profileFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _teamFactory         = teamFactory;
     _profileFactory      = profileFactory;
 }
예제 #26
0
 public IdentityService(
     IRequestProvider requestProvider,
     IDialogService dialogService,
     INavigationService navigationService,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _dialogService       = dialogService;
     _navigationService   = navigationService;
     _identityUtilService = identityUtilService;
 }
예제 #27
0
        public GlobalSetting()
        {
            _requestProvider = new RequestProvider();

            baseName   = GetAppSetting("baseName", string.Empty).ToString();
            serverName = GetAppSetting("serverName", string.Empty).ToString();
#if DEBUG
            login   = GetAppSetting("loginDebug", string.Empty).ToString();
            passwod = GetAppSetting("passwodDebug", string.Empty).ToString();
#endif
        }
예제 #28
0
 public IdentityService()
 {
     _requestProvider    = GlobalSetting.Instance.RequestProvider;
     _serializerSettings = new JsonSerializerSettings
     {
         ContractResolver     = new CamelCasePropertyNamesContractResolver(),
         DateTimeZoneHandling = DateTimeZoneHandling.Utc,
         NullValueHandling    = NullValueHandling.Ignore
     };
     _serializerSettings.Converters.Add(new StringEnumConverter());
 }
예제 #29
0
        internal Response Send(IRequestProvider request)
        {
            var httpRequest = request.GetRequest();

            var resp = _client.Get(httpRequest);

            using (var stream = resp.Body)
            {
                var pair = request.Parser.Parse(stream);
                return pair.Value;
            }
        }
예제 #30
0
        public WelcomeViewModel(INavigationService navigationService,
                                IRequestProvider requestProvider,
                                IAuthenticationService authenticationService,
                                IUserService userService) : base(navigationService)
        {
            this.requestProvider       = requestProvider;
            this.authenticationService = authenticationService;
            this.userService           = userService;

            SignInToAnotherAccountCommand = new Command(SignInToAnotherAccountCommandExecute);
            SignUpTpLogotypeCommand       = new Command(SignUpTpLogotypeCommandExecute);
            QuickLoginCommand             = new Command(QuickLoginCommandExecute);
        }
예제 #31
0
 public PaymentController(IRequestProvider requestProvider,
                          ILogger <PaymentController> logger,
                          IMerchantRepository merchantRepository,
                          ITransactionRepository transactionRepository,
                          ILogRepository logRepository,
                          ISubscriptionsRepository subscriptionsRepository)
 {
     _requestProvider         = requestProvider;
     _logger                  = logger;
     _merchantRepository      = merchantRepository;
     _transactionRepository   = transactionRepository;
     _logRepository           = logRepository;
     _subscriptionsRepository = subscriptionsRepository;
 }
예제 #32
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public ProfileService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     IProfileMediaService profileMediaService,
     IMediaFactory mediaFactory,
     IProfileFactory profileFactory,
     INavigationService navigationService)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _mediaFactory        = mediaFactory;
     _navigationService   = navigationService;
     _profileFactory      = profileFactory;
 }
예제 #33
0
 public PostService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     IGroupsService groupsService,
     IPostPublicityScopeFactory postPublicityScopeFactory,
     ITeamMemberService teamMemberService,
     IFamilyService familyService)
 {
     _requestProvider           = requestProvider;
     _identityUtilService       = identityUtilService;
     _groupsService             = groupsService;
     _postPublicityScopeFactory = postPublicityScopeFactory;
     _teamMemberService         = teamMemberService;
     _familyService             = familyService;
 }
예제 #34
0
 public NukitoFactCommand(
 IMethodInfo method,
 ConstructorInfo constructor,
 IRequestProvider requestProvider,
 IResolver resolver,
 IReflectionHelper reflectionHelper,
 IMockRepository mockRepository,
 MockSettings settings,
 MockSettings constructorSettings)
     : base(method)
 {
     _constructor = constructor;
       _requestProvider = requestProvider;
       _resolver = resolver;
       _reflectionHelper = reflectionHelper;
       _mockRepository = mockRepository;
       _settings = settings;
       _constructorSettings = constructorSettings;
 }
예제 #35
0
 public static IRequestProvider GetRequestProvider()
 {
     Lock.EnterReadLock();
     try
     {
         {
             if (_provider == null)
             {
                 if (Configuration.IsMock)
                     _provider = new MockRequestProvider();
                 else
                     _provider = new RequestProvider(AccountProviderFactory.GetAccountProvider());
             }
         }
     }
     finally
     {
         Lock.ExitReadLock();
     }
     return _provider;
 }
예제 #36
0
 protected FlexiWebClient(ICryptProvider crypt, IRequestProvider requestProvider, IJsonProvider jsonProvider)
 {
     _cryptProvider = crypt;
     _requestProvider = requestProvider;
     _jsonProvider = jsonProvider;
 }