Esempio n. 1
0
        /// <summary>
        /// Loads the settings from the local data store and binds them
        /// to this view model
        /// </summary>
        /// <returns></returns>
        private async Task UpdateValuesFromLocalStoreAsync(IClientDataStore clientDataStore)
        {
            // Get the stored credentials
            var storedCredentials = await clientDataStore.GetLoginCredentialsAsync();

            // Set first name
            FirstName.OriginalText = storedCredentials?.FirstName;

            // Set last name
            LastName.OriginalText = storedCredentials?.LastName;

            // Set username
            Username.OriginalText = storedCredentials?.Username;

            // Set email
            Email.OriginalText = storedCredentials?.Email;
        }
 /// <summary>Constructor</summary>
 /// <param name="secretStore">Secret Store</param>
 /// <param name="clientStore">Client Store</param>
 public ClientSecretStore(IVaultSecretStore secretStore, IClientDataStore clientStore)
 {
     this.secretStore = secretStore.ThrowIfNull(nameof(secretStore));
     this.clientStore = clientStore.ThrowIfNull(nameof(clientStore));
 }