Пример #1
0
        public async Task <UserProfileData> Get(CancellationToken ct)
        {
            var settings = await _applicationSettingsService.GetAndObserveCurrent().FirstAsync(ct);

            if (settings.AuthenticationData == default(AuthenticationData))
            {
                return(default(UserProfileData));
            }

            await Task.Delay(TimeSpan.FromSeconds(2));

            return(await GetTaskFromEmbeddedResource <UserProfileData>());
        }
 /// <inheritdoc/>
 public IObservable <AuthenticationData> GetAndObserveAuthenticationData()
 {
     return(_applicationSettingsService
            .GetAndObserveCurrent()
            .Select(s => s.AuthenticationData));
 }