Ejemplo n.º 1
0
        public async Task LogoutAsync(string sessionToken)
        {
            if (Adapter == AdapterType.Controller)
            {
                await Logic.Modules.Account.AccountManager.LogoutAsync(sessionToken).ConfigureAwait(false);
            }
            else if (Adapter == AdapterType.Service)
            {
                var serviceInvoker = new Service.InvokeServiceAdapter(BaseUri);

                serviceInvoker.SessionToken = sessionToken;
                await serviceInvoker.LogoutAsync(sessionToken).ConfigureAwait(false);
            }
        }
Ejemplo n.º 2
0
        public async Task LogoutAsync(string sessionToken)
        {
            if (Adapter == AdapterType.Controller)
            {
                var accountManager = Logic.Factory.CreateAccountManager();

                await accountManager.LogoutAsync(sessionToken).ConfigureAwait(false);
            }
            else if (Adapter == AdapterType.Service)
            {
                using var serviceInvoker = new Service.InvokeServiceAdapter(BaseUri)
                      {
                          SessionToken = sessionToken
                      };
                await serviceInvoker.LogoutAsync(sessionToken).ConfigureAwait(false);
            }
        }