Ejemplo n.º 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());
        }
Ejemplo n.º 3
0
 public SchedulingService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
 }
Ejemplo n.º 4
0
 public GerritRepoReader(IRequestProvider repoReader)
 {
     _repoReader     = repoReader;
     _jsonSerializer = new JsonSerializer {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     };
 }
Ejemplo n.º 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?
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
 public StocksService(
     IRequestProvider requestProvider,
     ISettingsService settingsService)
 {
     _requestProvider = requestProvider ?? throw new ArgumentNullException(nameof(requestProvider));
     _settingsService = settingsService ?? throw new ArgumentNullException(nameof(settingsService));
 }
Ejemplo n.º 9
0
 public CatalogDataService(
     IRequestProvider request,
     IBaseCacheStrategy cache)
 {
     _request = request;
     _cache   = cache;
 }
Ejemplo n.º 10
0
 public PluginsController(IModelMapper modelMapper, IPluginAccountant pluginAccountant, IDataSerializer dataSerializer, PluginSettings pluginSettings, IRequestProvider requestProvider)
 {
     _modelMapper      = modelMapper;
     _pluginAccountant = pluginAccountant;
     _dataSerializer   = dataSerializer;
     _pluginSettings   = pluginSettings;
     _requestProvider  = requestProvider;
 }
Ejemplo n.º 11
0
 public UpdatesComponent(IRequestProvider requestProvider, SystemSettings systemSettings, ISettingService settingService, GeneralSettings generalSettings, IDataSerializer dataSerializer)
 {
     _requestProvider = requestProvider;
     _systemSettings  = systemSettings;
     _settingService  = settingService;
     _generalSettings = generalSettings;
     _dataSerializer  = dataSerializer;
 }
Ejemplo n.º 12
0
 public GenreService(
     IRequestProvider requestProvider,
     ISettingsService settingsService
     )
 {
     _requestProvider = requestProvider;
     _settingsService = settingsService;
 }
Ejemplo n.º 13
0
 public ShoppingCartService(
     IRequestProvider requestProvider,
     ICustomerService customerService,
     INavigationService navigationService)
 {
     _requestProvider   = requestProvider;
     _customerService   = customerService;
     _navigationService = navigationService;
 }
Ejemplo n.º 14
0
 public TeamMemberService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     ITeamMemberFactory teamMemberFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _teamMemberFactory   = teamMemberFactory;
 }
Ejemplo n.º 15
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public IdentityService(
     IRequestProvider requestProvider,
     INavigationService navigationService,
     IAnnouncementSignalService announcementHubService)
 {
     _requestProvider        = requestProvider;
     _navigationService      = navigationService;
     _announcementHubService = announcementHubService;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 18
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public FriendService(
     IRequestProvider requestProvider,
     IProfileService profileService,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _profileService      = profileService;
     _identityUtilService = identityUtilService;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 25
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public TeamService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     ITeamFactory teamFactory,
     IProfileFactory profileFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _teamFactory         = teamFactory;
     _profileFactory      = profileFactory;
 }
Ejemplo n.º 26
0
 public IdentityService(
     IRequestProvider requestProvider,
     IDialogService dialogService,
     INavigationService navigationService,
     IIdentityUtilService identityUtilService)
 {
     _requestProvider     = requestProvider;
     _dialogService       = dialogService;
     _navigationService   = navigationService;
     _identityUtilService = identityUtilService;
 }
Ejemplo n.º 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
        }
Ejemplo n.º 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());
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 36
0
 protected FlexiWebClient(ICryptProvider crypt, IRequestProvider requestProvider, IJsonProvider jsonProvider)
 {
     _cryptProvider = crypt;
     _requestProvider = requestProvider;
     _jsonProvider = jsonProvider;
 }