protected override void ProcessRecord()
        {
            base.ProcessRecord();
            var ctx = base.Context;

            if (Identity != null)
            {
                var group = new SPOTermGroup(Identity.Read());
                WriteObject(group);
            }
            else
            {
                TaxonomySession ts = TaxonomySession.GetTaxonomySession(ctx);
                var termStores = ts.TermStores;
                ctx.Load(termStores);
                ctx.ExecuteQuery();

                foreach (TermStore termStore in termStores)
                {
                    var groups = termStore.Groups;
                    ctx.Load(groups);
                    ctx.ExecuteQuery();
                    foreach (var group in groups)
                    {
                        WriteObject(new SPOTermGroup(group));
                    }
                }
            }
        }
        public SPOTermGroup GetGroup()
        {
            if (_termGroup != null)
            {
                return(_termGroup);
            }

            TermGroup group = _termSet.Group;

            _termSet.Context.Load(group);
            _termSet.Context.ExecuteQuery();
            _termGroup = new SPOTermGroup(group);
            return(_termGroup);
        }
示例#3
0
        public SPOTermGroup GetSystemGroup()
        {
            if (_systemGroup != null)
            {
                return(_systemGroup);
            }

            var systemGroup = _termStore.SystemGroup;

            if (!_termStore.IsObjectPropertyInstantiated("SystemGroup"))
            {
                _termStore.Context.Load(systemGroup);
                _termStore.Context.ExecuteQuery();
            }
            _systemGroup = new SPOTermGroup(systemGroup);
            return(_systemGroup);
        }
示例#4
0
        public virtual void Refresh()
        {
            _termStore.RefreshLoad();
            _termStore.Context.ExecuteQuery();

            if (_termStore.IsPropertyAvailable("DefaultLanguage"))
            {
                SetProp("DefaultLanguage", _termStore.DefaultLanguage, false);
            }
            if (_termStore.IsPropertyAvailable("WorkingLanguage"))
            {
                SetProp("WorkingLanguage", _termStore.WorkingLanguage, false);
            }

            _systemGroup          = null;
            _groups               = null;
            _hashTagsTermSet      = null;
            _orphanedTermsTermSet = null;
            _keywordsTermSet      = null;
        }
        public virtual void Refresh()
        {
            _termStore.RefreshLoad();
            _termStore.Context.ExecuteQuery();

            if (_termStore.IsPropertyAvailable("DefaultLanguage"))
                SetProp("DefaultLanguage", _termStore.DefaultLanguage, false);
            if (_termStore.IsPropertyAvailable("WorkingLanguage"))
                SetProp("WorkingLanguage", _termStore.WorkingLanguage, false);

            _systemGroup = null;
            _groups = null;
            _hashTagsTermSet = null;
            _orphanedTermsTermSet = null;
            _keywordsTermSet = null;
        }
        public SPOTermGroup GetSystemGroup()
        {
            if (_systemGroup != null) return _systemGroup;

            var systemGroup = _termStore.SystemGroup;
            if (!_termStore.IsObjectPropertyInstantiated("SystemGroup"))
            {
                _termStore.Context.Load(systemGroup);
                _termStore.Context.ExecuteQuery();
            }
            _systemGroup = new SPOTermGroup(systemGroup);
            return _systemGroup;
        }
        public SPOTermGroup GetGroup()
        {
            if (_termGroup != null) return _termGroup;

            TermGroup group = _termSet.Group;
            _termSet.Context.Load(group);
            _termSet.Context.ExecuteQuery();
            _termGroup = new SPOTermGroup(group);
            return _termGroup;
        }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            var ctx = base.Context;

            var group = new SPOTermGroup(Group.Read());
            WriteObject(group.CreateTermSet(Name, Id, LCID, Contact, Description, CustomSortOrder, IsAvailableForTagging, Owner, IsOpenForTermCreation));
        }