Ejemplo n.º 1
0
        // ReSharper restore UnusedAutoPropertyAccessor.Global

        public IEnumerable <Claim> Claims()
        {
            return(new List <Claim>
            {
                new Claim(ClaimTypes.Authentication, "true"),
                new Claim(ClaimTypes.Name, Email),
                new Claim(ClaimTypes.Anonymous, IsAnonymous.ToString()),
                new Claim(ClaimTypes.Email, Email)
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Возвращает словарь параметров.
        /// </summary>
        public override Dictionary <string, string> GetParameters()
        {
            var parameters = base.GetParameters();

            parameters["question"] = Question;
            if (IsAnonymous != VKBoolean.False)
            {
                parameters["is_anonymous"] = IsAnonymous.ToString();
            }
            if (OwnerID != 0)
            {
                parameters["owner_id"] = OwnerID.ToString();
            }
            parameters["add_answers"] = (string)JsonConvert.SerializeObject(AddAnswers);

            return(parameters);
        }