示例#1
0
        /// <summary>
        /// Get personal information about authorized user
        /// </summary>
        /// <param name="client"></param>
        /// <param name="styles"></param>
        /// <returns>PersonInfo instance</returns>
        public static async Task <PersonInfo> GetPersonInfoAsync(this EsiaClient client, SendStyles styles = SendStyles.Normal)
        {
            if (client.Token == null)
            {
                throw new ArgumentNullException("Token");
            }

            return(await client.GetPersonInfoAsync(client.Token.SbjId, styles));
        }
示例#2
0
        /// <summary>
        /// Get personal information about authorized user
        /// </summary>
        /// <param name="client"></param>
        /// <returns>PersonInfo instance</returns>
        public static async Task <PersonInfo> GetPersonInfoAsync(this EsiaClient client)
        {
            if (client.Token == null)
            {
                throw new ArgumentNullException("Token");
            }

            return(await client.GetPersonInfoAsync(client.Token.SbjId));
        }