Ejemplo n.º 1
0
        public virtual string GetCategory()
        {
            if (Term2Decorate == null)
            {
                return(CategoryName);
            }

            return(string.Join(", ", Term2Decorate.GetCategory(), CategoryName));
        }
Ejemplo n.º 2
0
        public virtual bool IsCategory(Type category)
        {
            if (category == null)
            {
                return(false);
            }

            if (category == this.GetType())
            {
                return(true);
            }

            return(Term2Decorate?.IsCategory(category) ?? false);
        }
Ejemplo n.º 3
0
        public ITermCategory As(ITermCategory category)
        {
            if (category == null)
            {
                return(this);
            }

            if (Term2Decorate == null)
            {
                Term2Decorate = category;
                return(this);
            }

            Term2Decorate.As(category);
            return(this);
        }
Ejemplo n.º 4
0
 public virtual int GetRank()
 {
     return(Term2Decorate?.GetRank() ?? 0);
 }