コード例 #1
0
 private static IExtendedCloudIdentityProvider BuildProvider(IRestService restService = null, ICache<UserAccess> cache = null)
 {
     Uri baseUri = null;
     if (Bootstrapper.Settings.RackspaceExtendedIdentityUrl != null)
         baseUri = new Uri(Bootstrapper.Settings.RackspaceExtendedIdentityUrl);
     return new CloudIdentityProvider(restService, cache, baseUri);
 }
コード例 #2
0
 public LoginService(IRestService restService, IGitApiProvider gitApiProvider,
     ICredentialsService credentialsService)
 {
     _restService = restService;
     _gitApiProvider = gitApiProvider;
     _credentialsService = credentialsService;
 }
コード例 #3
0
        public EventLogService(IRestService restService, ILetMeServiceUrlSettings urlSettings)
        {
            Check.If(restService).IsNotNull();

            _restService = restService;
            _urlSettings = urlSettings;
        }
コード例 #4
0
        //TODO: Sort this out!
        public static ApplicationSummary GetShortUrls(ApplicationSummary application, string type, ILetMeServiceUrlSettings _settings, IRestService _restService)
        {
            var shortUrl = string.Empty;
            var uri = new Uri($"{_settings.UrlShortenerUrl}/url/shorten");
            var longUrl = new ShortUrlRequest
            {
                Value = $"{_settings.LetMeWebsiteUrl}/Registration/GuarantorDetails/{application.ApplicationReference}"
            };
            var json = _restService.Post(uri, longUrl, ApiOwner.Letme, "");

            shortUrl = !string.IsNullOrEmpty(json) ? _restService.Deserialize<string>(json) : longUrl.Value;

            if (application.ShortUrls == null)
            {
                application.ShortUrls = new List<ShortUrl>();
            }
            else
            {
                application.ShortUrls.Clear();
            }
            application.ShortUrls.Add(new ShortUrl
            {
                Value = shortUrl,
                Type = type
            });

            return application;
        }
コード例 #5
0
 public RentalService(IRestService restService)
 {
     this.restService = restService;
     rentalPlans = new List<RentalPlanItem>();
     availableEquipment = new List<Equipment>();
     rentals = new List<RentalItem>();
 }
コード例 #6
0
 internal CloudFilesProvider(CloudIdentity defaultIdentity, ICloudIdentityProvider cloudIdentityProvider, IRestService restService, ICloudFilesValidator cloudFilesValidator, ICloudFilesMetadataProcessor cloudFilesMetadataProcessor, IEncodeDecodeProvider encodeDecodeProvider)
     : base(defaultIdentity, cloudIdentityProvider, restService)
 {
     _cloudFilesValidator = cloudFilesValidator;
     _cloudFilesMetadataProcessor = cloudFilesMetadataProcessor;
     _encodeDecodeProvider = encodeDecodeProvider;
 }
コード例 #7
0
        public GeoserverRestClient(IRestService restService)
        {
            if (restService == null)
                throw new ArgumentNullException("restService", "restService cannot be null!");

            this.restService = restService;
        }
コード例 #8
0
        public SegmentProvider(IRestService restService, IAccountSettings accountSettings)
        {
            Check.If(restService).IsNotNull();
            Check.If(accountSettings).IsNotNull();

            _restService = restService;
            _api = accountSettings.GetSetting("MailChimpApi");
        }
コード例 #9
0
ファイル: MainViewModel.cs プロジェクト: robledop/Demos-20484
		public MainViewModel(IRestService restService)
		{
			_restService = restService;
			GetAllProductsCommand = new RelayCommand(GetAllProducts);
			InsertProductCommand = new RelayCommand(InsertProduct);
			DeleteProductCommand = new RelayCommand(DeleteProduct);
			UpdateProductCommand = new RelayCommand(UpdateProduct);
		}
コード例 #10
0
        public CampaignProvider(IRestService restService, IAccountSettings accountSettings)
        {
            _restService = restService;
            _accountSettings = accountSettings;

            _api = accountSettings.GetSetting("MailChimpApi");
            _listId = accountSettings.GetSetting("MailChimpMasterListId");
        }
コード例 #11
0
 public SitemapsPageViewModel(IResourceLoader resourceLoader, INavigationService navigationService, IOpenhabDatabase database, IEventAggregator eventAggregator, IRestService restService)
 {
     this._navigationService = navigationService;
     this._resourceLoader = resourceLoader;
     this._database = database;
     this._eventAggregator = eventAggregator;
     this._restService = restService;
 }
コード例 #12
0
        public ApplicationProvider(IRestService restService, ILetMeServiceUrlSettings urlSettings, ILogger logger)
        {
            Check.If(restService).IsNotNull();
            Check.If(urlSettings).IsNotNull();

            _restService = restService;
            _urlSettings = urlSettings;
            _logger = logger;
        }
コード例 #13
0
		public WeatherTrackingService(
			ILocationTrackingService locationTrackingService,
			IRestService restService,
			IMvxMessenger messenger)
		{
			_locationTrackingService = locationTrackingService;
			_restService = restService;
			_messenger = messenger;
		}
コード例 #14
0
        public PropertyProvider(IRestService restService, ILetMeServiceEndpoints endpointSettings, ILetMeServiceUrlSettings urlSettings)
        {
            Check.If(endpointSettings).IsNotNull();
            Check.If(urlSettings).IsNotNull();
            Check.If(restService).IsNotNull();

            _restService = restService;
            _endpointSettings = endpointSettings;
            _urlSettings = urlSettings;
        }
コード例 #15
0
        public SmsService(IRestService restService, IServiceUrlSettings serviceUrlSettings, ISmsSettings smsSettings)
        {
            Check.If(restService).IsNotNull();
            Check.If(serviceUrlSettings).IsNotNull();
            Check.If(smsSettings).IsNotNull();

            _restService = restService;
            _serviceUrlSettings = serviceUrlSettings;
            _smsSettings = smsSettings;
        }
コード例 #16
0
        public MainViewModel(IRestService restService, ISettingsService settingsService, IUserInterfaceService userInterfaceService)
        {
            _restService = restService;
            _settingsService = settingsService;
            _userInterfaceService = userInterfaceService;

            Messenger.Default.Register<Exception>(this, UserInterfaceService.Commands.ShowFeedback, e => ShowFeedback(e));
            Messenger.Default.Register<string>(this, UserInterfaceService.Commands.ShowBusyIndicator, m => BusyIndicatorVisibility = Visibility.Visible);
            Messenger.Default.Register<string>(this, UserInterfaceService.Commands.HideBusyIndicator, m => BusyIndicatorVisibility = Visibility.Collapsed);
        }
コード例 #17
0
        public EmailProvider(IRestService restService, ILogger logger, IAccountSettings accountSettings)
        {
            Check.If(restService).IsNotNull();
            Check.If(logger).IsNotNull();
            Check.If(accountSettings).IsNotNull();

            _restService = restService;
            _logger = logger;

            _api = accountSettings.GetSetting("MailChimpApi");
        }
コード例 #18
0
        public HomePageViewModel(IEventAggregator eventAggregator, IRestService restService, INavigationService navigationService,
            IPushClientService pushClientService, IOpenhabDatabase database)
        {
            _eventAggregator = eventAggregator;
            _restService = restService;
            _navigationService = navigationService;
            _pushClientService = pushClientService;
            _database = database;

            ShowSitemapsCommand = new DelegateCommand(ShowSitemaps);
            ShowSetupCommand = new DelegateCommand(ShowSetup);
            ShowInfoCommand = new DelegateCommand(ShowInfo);
        }
コード例 #19
0
 public NetworkingViewModel(IRestService restService, IUserInterfaceService userInterfaceSerive)
 {
     _restService = restService;
     _userInterfaceService = userInterfaceSerive;
     Messenger.Default.Register<WifiAdapterModel.Interface>(this, UserInterfaceService.Commands.WifiAdapterSelectionChanged, async m =>
     {
         try
         {
             WifiNetworksModel = await _restService.GetAsync<WifiNetworksModel>(new Uri(String.Format("api/wifi/networks?interface={0}",
                 m.GUID.ToString("D")), UriKind.Relative));
         }
         catch (Exception ex)
         {
             await _userInterfaceService.ShowFeedbackAsync(ex);
         }
     });
 }
コード例 #20
0
 public RestControllerBaseController(IRestService <T> restService)
 {
     RestService = restService;
 }
コード例 #21
0
 public ObjectStoreProvider(IIdentityProvider identityProvider, IRestService restService)
     : base(identityProvider, restService) { }
コード例 #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudBlockStorageProvider"/> class with
 /// the specified default identity, default region, identity provider, and REST service implementation.
 /// </summary>
 /// <param name="identity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param>
 /// <param name="defaultRegion">The default region to use for calls that do not explicitly specify a region. If this value is <see langword="null"/>, the default region for the user will be used; otherwise if the service uses region-specific endpoints all calls must specify an explicit region.</param>
 /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <see langword="null"/>, a new instance of <see cref="CloudIdentityProvider"/> is created using <paramref name="identity"/> as the default identity.</param>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 public CloudBlockStorageProvider(CloudIdentity identity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService)
     : this(identity, defaultRegion, identityProvider, restService, CloudBlockStorageValidator.Default)
 {
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudBlockStorageProvider"/> class with
 /// no default identity or region, the default identity provider, and the specified
 /// REST service implementation.
 /// </summary>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 public CloudBlockStorageProvider(IRestService restService)
     : this(null, null, null, restService)
 {
 }
コード例 #24
0
        public VictimManager(IRestService service)

        {
            restService = service;
        }
コード例 #25
0
 public WorkLogService(IRestService restService, IGitApiProvider gitApiProvider)
 {
     _restService = restService;
     _gitApiProvider = gitApiProvider;
 }
コード例 #26
0
 public ChatViewModel(IMessageFactory messageFactory, IMessageService messageService, IRestService restService)
 {
     _messageFactory = messageFactory;
     _messageService = messageService;
     _restService    = restService;
 }
コード例 #27
0
 public CityAPI(IRestService _service) : base(_service)
 {
 }
コード例 #28
0
 public DoctorsManager(IRestService service)
 {
     restService = service;
 }
コード例 #29
0
ファイル: UserManager.cs プロジェクト: ple103/apss-330
 public UserManager()
 {
     // Sets the rest API to use, from the main app class.
     restService = App.restService;
 }
コード例 #30
0
 public IdentityProvider(IRestService restService = null, ICache<UserAccess> tokenCache = null, string usInstanceUrlBase = null, string ukInstanceUrlBase = null)
 {
     _factory = new IdentityProviderFactory(restService, tokenCache, usInstanceUrlBase, ukInstanceUrlBase);
 }
コード例 #31
0
ファイル: TaxiService.cs プロジェクト: netast/taxi
 public TaxiService(IRestService restService)
 {
     _restService = restService;
 }
コード例 #32
0
 public CertificateManager(IRestService service)
 {
     _restService = service;
 }
コード例 #33
0
 public Execute(IRestService restService)
 {
     _restService = restService;
 }
コード例 #34
0
 public ShoppingListDatabase(IRestService service)
 {
     restService = service;
 }
コード例 #35
0
 public EventDetailController(IRestService serviceContext)
 {
     _serviceContext = serviceContext;
 }
コード例 #36
0
 public RestStockClerkController(IRestService restService)
 {
     this.restService = restService;
 }
コード例 #37
0
ファイル: Articles.cshtml.cs プロジェクト: samjones00/blog
 public ArticlesModel(ILogger<IndexModel> logger)
 {
     _logger = logger;
     _restService = new RestService();
 }
コード例 #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class
 /// using the provided values.
 /// </summary>
 /// <param name="urlBase">The base URL for the cloud instance. Predefined URLs are available in <see cref="PredefinedHpIdentityEndpoints"/>.</param>
 /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception>
 public HpIdentityProvider(Uri urlBase, CloudIdentity defaultIdentity, IRestService restService, ICache<UserAccess> tokenCache)
     : base(defaultIdentity, restService, tokenCache, urlBase)
 {
     if (urlBase == null)
         throw new ArgumentNullException("urlBase");
 }
コード例 #39
0
 public UserService(IRestService restService)
 {
     _restService = restService;
 }
コード例 #40
0
 public ObjectStoreProvider(IIdentityProvider identityProvider, IRestService restService, IObjectStoreValidator objectStoreValidator)
     : base(identityProvider, restService)
 {
     _objectStoreValidator = objectStoreValidator;
 }
コード例 #41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudBlockStorageProvider"/> class with
 /// the specified default identity, no default region, and the specified identity
 /// provider and REST service implementation.
 /// </summary>
 /// <param name="identity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param>
 /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <see langword="null"/>, a new instance of <see cref="CloudIdentityProvider"/> is created using <paramref name="identity"/> as the default identity.</param>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 public CloudBlockStorageProvider(CloudIdentity identity, IIdentityProvider identityProvider, IRestService restService)
     : this(identity, null, identityProvider, restService)
 {
 }
コード例 #42
0
 public StrapiService(IRestService restService)
 {
     this.restService = restService;
 }
コード例 #43
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloudBlockStorageProvider"/> class with
        /// the specified default identity, default region, identity provider, REST service
        /// implementation, and block storage validator.
        /// </summary>
        /// <param name="identity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param>
        /// <param name="defaultRegion">The default region to use for calls that do not explicitly specify a region. If this value is <see langword="null"/>, the default region for the user will be used; otherwise if the service uses region-specific endpoints all calls must specify an explicit region.</param>
        /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <see langword="null"/>, a new instance of <see cref="CloudIdentityProvider"/> is created with no default identity.</param>
        /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
        /// <param name="cloudBlockStorageValidator">The <see cref="IBlockStorageValidator"/> to use for validating requests to this service.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="cloudBlockStorageValidator"/> is <see langword="null"/>.</exception>
        internal CloudBlockStorageProvider(CloudIdentity identity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService, IBlockStorageValidator cloudBlockStorageValidator)
            : base(identity, defaultRegion, identityProvider, restService)
        {
            if (cloudBlockStorageValidator == null)
            {
                throw new ArgumentNullException("cloudBlockStorageValidator");
            }

            _cloudBlockStorageValidator = cloudBlockStorageValidator;
        }
コード例 #44
0
        /// <summary>
        ///     Initialize a new instance of the SchemaRegistryClient class.
        /// </summary>
        /// <param name="config">
        ///     Configuration properties.
        /// </param>
        public CachedSchemaRegistryClient(IEnumerable <KeyValuePair <string, string> > config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config properties must be specified.");
            }

            var schemaRegistryUrisMaybe = config.FirstOrDefault(prop => prop.Key.ToLower() == SchemaRegistryConfig.PropertyNames.SchemaRegistryUrl);

            if (schemaRegistryUrisMaybe.Value == null)
            {
                throw new ArgumentException($"{SchemaRegistryConfig.PropertyNames.SchemaRegistryUrl} configuration property must be specified.");
            }
            var schemaRegistryUris = (string)schemaRegistryUrisMaybe.Value;

            var timeoutMsMaybe = config.FirstOrDefault(prop => prop.Key.ToLower() == SchemaRegistryConfig.PropertyNames.SchemaRegistryRequestTimeoutMs);
            int timeoutMs;

            try { timeoutMs = timeoutMsMaybe.Value == null ? DefaultTimeout : Convert.ToInt32(timeoutMsMaybe.Value); }
            catch (FormatException) { throw new ArgumentException($"Configured value for {SchemaRegistryConfig.PropertyNames.SchemaRegistryRequestTimeoutMs} must be an integer."); }

            var identityMapCapacityMaybe = config.FirstOrDefault(prop => prop.Key.ToLower() == SchemaRegistryConfig.PropertyNames.SchemaRegistryMaxCachedSchemas);

            try { this.identityMapCapacity = identityMapCapacityMaybe.Value == null ? DefaultMaxCachedSchemas : Convert.ToInt32(identityMapCapacityMaybe.Value); }
            catch (FormatException) { throw new ArgumentException($"Configured value for {SchemaRegistryConfig.PropertyNames.SchemaRegistryMaxCachedSchemas} must be an integer."); }

            var basicAuthSource = config.FirstOrDefault(prop => prop.Key.ToLower() == SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource).Value ?? "";
            var basicAuthInfo   = config.FirstOrDefault(prop => prop.Key.ToLower() == SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthUserInfo).Value ?? "";

            string username = null;
            string password = null;

            if (basicAuthSource == "USER_INFO" || basicAuthSource == "")
            {
                if (basicAuthInfo != "")
                {
                    var userPass = (basicAuthInfo).Split(':');
                    if (userPass.Length != 2)
                    {
                        throw new ArgumentException($"Configuration property {SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthUserInfo} must be of the form 'username:password'.");
                    }
                    username = userPass[0];
                    password = userPass[1];
                }
            }
            else if (basicAuthSource == "SASL_INHERIT")
            {
                if (basicAuthInfo != "")
                {
                    throw new ArgumentException($"{SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource} set to 'SASL_INHERIT', but {SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthUserInfo} as also specified.");
                }
                var saslUsername = config.FirstOrDefault(prop => prop.Key == "sasl.username");
                var saslPassword = config.FirstOrDefault(prop => prop.Key == "sasl.password");
                if (saslUsername.Value == null)
                {
                    throw new ArgumentException($"{SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource} set to 'SASL_INHERIT', but 'sasl.username' property not specified.");
                }
                if (saslPassword.Value == null)
                {
                    throw new ArgumentException($"{SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource} set to 'SASL_INHERIT', but 'sasl.password' property not specified.");
                }
                username = saslUsername.Value;
                password = saslPassword.Value;
            }
            else
            {
                throw new ArgumentException($"Invalid value '{basicAuthSource}' specified for property '{SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource}'");
            }

            KeySubjectNameStrategy   = GetKeySubjectNameStrategy(config);
            ValueSubjectNameStrategy = GetValueSubjectNameStrategy(config);

            foreach (var property in config)
            {
                if (!property.Key.StartsWith("schema.registry."))
                {
                    continue;
                }

                if (property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryUrl &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryRequestTimeoutMs &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryMaxCachedSchemas &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthCredentialsSource &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryBasicAuthUserInfo &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryKeySubjectNameStrategy &&
                    property.Key != SchemaRegistryConfig.PropertyNames.SchemaRegistryValueSubjectNameStrategy)
                {
                    throw new ArgumentException($"Unknown configuration parameter {property.Key}");
                }
            }

            this.restService = new RestService(schemaRegistryUris, timeoutMs, username, password);
        }
コード例 #45
0
 public SPItemManager(IRestService service)
 {
     restService = service;
 }
コード例 #46
0
 public ProcessesViewModel(IRestService restService, IUserInterfaceService userInterfaceService)
 {
     _restService = restService;
     _userInterfaceService = userInterfaceService;
 }
コード例 #47
0
 public RestSharpViewModel(IRestService restService)
 {
     _restService = restService;
 }
コード例 #48
0
 internal CloudFilesProvider(ICloudIdentityProvider cloudIdentityProvider, IRestService restService, ICloudFilesValidator cloudFilesValidator, ICloudFilesMetadataProcessor cloudFilesMetadataProcessor, IEncodeDecodeProvider encodeDecodeProvider)
     : this(null, cloudIdentityProvider, restService, cloudFilesValidator, cloudFilesMetadataProcessor, encodeDecodeProvider) { }
コード例 #49
0
 public WebService()
 {
     _restService = new RestService();
 }
コード例 #50
0
 public LoginViewModel(IRestService restService)
 {
     _restService = restService;
 }
コード例 #51
0
 public static void Initialize()
 {
     restService = new RestService();
 }
コード例 #52
0
 public FactService(IRestService restService, ISecureStorageService secureStorageService, IBackgroundService backgroundService)
 {
     _restService          = restService;
     _secureStorageService = secureStorageService;
     _backgroundService    = backgroundService;
 }
コード例 #53
0
 public ComputeProvider(IIdentityProvider identityProvider = null, IRestService restService = null)
 {
     _factory = new ComputeProviderFactory(identityProvider, restService);
 }
コード例 #54
0
ファイル: TodoItemManager.cs プロジェクト: pablotdv/Estudos
 public TodoItemManager(IRestService service)
 {
     restService = service;
 }
コード例 #55
0
 public UserManager(IRestService service)
 {
     restService = service;
 }
コード例 #56
0
 public InfiniteScrollViewModel(IRestService service)
 {
     page         = 1;
     Movies       = new ObservableCollection <Movie>();
     this.service = service;
 }
コード例 #57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class
 /// with no default identity, and the specified base URL, REST service
 /// implementation, and token cache.
 /// </summary>
 /// <param name="urlBase">The base URL for the cloud instance. Predefined URLs are available in <see cref="PredefinedHpIdentityEndpoints"/>.</param>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception>
 public HpIdentityProvider(Uri urlBase, IRestService restService, ICache<UserAccess> tokenCache)
     : this(urlBase, null, restService, tokenCache)
 {
 }
コード例 #58
0
ファイル: LocationServices.cs プロジェクト: wade1990/Rumble-4
 public LocationServices(IRestService _rest)
 {
     Rest = _rest;
 }
コード例 #59
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class
 /// using the <see cref="PredefinedHpIdentityEndpoints.Default"/> base URL and provided values.
 /// </summary>
 /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param>
 /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param>
 /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param>
 public HpIdentityProvider(CloudIdentity defaultIdentity, IRestService restService, ICache<UserAccess> tokenCache)
     : this(PredefinedHpIdentityEndpoints.Default, defaultIdentity, restService, tokenCache)
 {
 }
コード例 #60
0
 public Forecast(IRestService rest)
 {
     service = rest;
 }