コード例 #1
0
        public Task <int?> ResolveTenantId(ResolveTenantIdInput input)
        {
            if (string.IsNullOrEmpty(input.c))
            {
                return(Task.FromResult(AbpSession.TenantId));
            }

            var parameters = SimpleStringCipher.Instance.Decrypt(input.c);
            var query      = HttpUtility.ParseQueryString(parameters);

            if (query["tenantId"] == null)
            {
                return(Task.FromResult <int?>(null));
            }

            var tenantId = Convert.ToInt32(query["tenantId"]) as int?;

            return(Task.FromResult(tenantId));
        }
コード例 #2
0
 public async Task <int?> ResolveTenantId(ResolveTenantIdInput input)
 {
     return(await ApiClient.PostAnonymousAsync <int?>(GetEndpoint(nameof(ResolveTenantId)), input));
 }