Apache.Shiro.Subject.SubjectBuilder.ContextAttribute C# (CSharp) Метод

ContextAttribute() публичный Метод

public ContextAttribute ( string attributeKey, object attributeValue ) : SubjectBuilder
attributeKey string
attributeValue object
Результат SubjectBuilder
        public SubjectBuilder ContextAttribute(string attributeKey, object attributeValue)
        {
            if (string.IsNullOrEmpty(attributeKey))
            {
                throw new ArgumentNullException("attributeKey");
            }

            if (attributeValue == null)
            {
                _subjectContext.Remove(attributeKey);
            }
            else
            {
                _subjectContext.Add(attributeKey, attributeValue);
            }
            return this;
        }