Пример #1
0
            /// <summary>
            /// 获取角色详情
            /// </summary>
            /// <param name="code">角色唯一标志</param>
            /// <param name="cancellationToken"></param>
            /// <returns></returns>
            public async Task <Role> Detail(
                string code,
                CancellationToken cancellationToken = default)
            {
                var param = new RoleParam(code);
                await client.GetAccessToken();

                var res = await client.Request <RoleResponse>(param.CreateRequest(), cancellationToken);

                return(res.Result);
            }
            public async Task <Role> Detail(
                string code,
                string _namespace = null,
                CancellationToken cancellationToken = default
                )
            {
                var param = new RoleParam(code)
                {
                    Namespace = _namespace
                };
                var res = await client.Request <RoleResponse>(param.CreateRequest(), cancellationToken);

                return(res.Result);
            }