示例#1
0
        protected void GenerateTermsTree(ModelNode termSetOrTermNode, int deep, bool cleanGuid)
        {
            if (deep == 0)
                return;

            termSetOrTermNode.AddRandomTerm(term =>
            {
                var termDef = term.Value as TaxonomyTermDefinition;
                termDef.Name = string.Format("InvertedLevel_{0}_{1}", deep, termDef.Name);

                if (cleanGuid)
                    termDef.Id = null;

                GenerateTermsTree(term, --deep, cleanGuid);
            });
        }
示例#2
0
        protected void GenerateTermsTree(ModelNode termSetOrTermNode, int deep, bool cleanGuid)
        {
            if (deep == 0)
            {
                return;
            }

            termSetOrTermNode.AddRandomTerm(term =>
            {
                var termDef  = term.Value as TaxonomyTermDefinition;
                termDef.Name = string.Format("InvertedLevel_{0}_{1}", deep, termDef.Name);

                if (cleanGuid)
                {
                    termDef.Id = null;
                }

                GenerateTermsTree(term, --deep, cleanGuid);
            });
        }