public async Task <GenericResult <UserStorePolicy> > GetUserStorePolicy() { var result = new GenericResult <UserStorePolicy>(); try { result.Data = await _policyAccessor.GetUserStorePolicy(); result.Message = "Success"; } catch (Exception ex) { result.IsFailure = true; result.Exception = ex; result.Message = ex.Message; } return(result); }
public async Task RefreshPolicies() { var shared = _sharedPolicyAccessor.GetPolicy(); await _policyAccessor.GetLockoutPolicy() .ContinueWith(async tsk => SetLockoutSharedPolicy(await tsk, shared.Lockout)); await _policyAccessor.GetPasswordPolicy() .ContinueWith(async tsk => SetPasswordSharedPolicy(await tsk, shared.Password)); await _policyAccessor.GetSignInPolicy() .ContinueWith(async tsk => SetSignInSharedPolicy(await tsk, shared.SignIn)); await _policyAccessor.GetUserPolicy() .ContinueWith(async tsk => SetUserSharedPolicy(await tsk, shared.User)); await _policyAccessor.GetUserStorePolicy() .ContinueWith(async tsk => SetUserStoredSharedPolicy(await tsk, shared.Stores)); }