public ValuesViewModel(IApiService apiService, IEncryptionManager encManager, ILocalStore localStore) { _apiService = apiService; _encManager = encManager; _localStore = localStore; ListValues.CollectionChanged += ListValues_CollectionChanged; }
public async Task SendMetricWhenAppLaunched(PushConfig pushConfig) { ILocalStore store = CreateChannelStore(); var pushIdentifier = store.Read(PUSH_ID_KEY); var client = CreateUPSHttpClient(pushConfig); await client.SendMetrics(pushIdentifier); store.Save(PUSH_ID_KEY, null); }
public Executioner( IHttpService httpService, ILocalStore localStore, IConfigurationSupplier configurationSupplier, EmailManager emailManager ) { m_HttpService = httpService; m_LocalStore = localStore; m_ConfigurationSupplier = configurationSupplier; m_EmailManager = emailManager; }
public AuthorizationModel(IEnumerable<IResourceScope> availableServices, ILocalStore localStore, ILoggerFactory loggerFactory) { _localStore = localStore; _logger = loggerFactory.GetLogger(); _availableServices = availableServices.ToArray(); _selectedServices = new ObservableCollection<IResourceScope>(_availableServices); _currentSession = LoadSession(); if (_currentSession != null) { _status.OnNext(AuthorizationStatus.Authorized); } }
public override async Task <string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; installation.deviceToken = channelUri; await client.Register(installation); return(installation.deviceToken); }
public async Task <string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; if (!token.Equals(store.Read(CHANNEL_KEY))) { installation.deviceToken = channelUri; await client.Register(installation); store.Save(CHANNEL_KEY, token); } return(installation.deviceToken); }
private static IEnumerable <string> GenerateLocalStore(ILocalStore localStore, string contentOfFunctionName, int level, AstModel parent) { if (VERBOSE) { yield return("\r\n// <LocalStore>\r\n"); } var local = localStore.Local; var codeVarName = ExtractCodeVarName(local); yield return(codeVarName); yield return(" = "); foreach (var sourceCode in GenerateExpression(localStore.SourceExpr, contentOfFunctionName, level)) { yield return(sourceCode); } }