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

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

                foreach (TermStore termStore in termStores)
                {
                    ctx.Load(termStore, ts1 => ts1.ContentTypePublishingHub);
                    ctx.ExecuteQuery();
                    WriteObject(new SPOTermStore(termStore));
                }
            }
        }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            var ctx = base.Context;

            var termStore = new SPOTermStore(TermStore.Read());

            WriteObject(termStore.CreateGroup(Name, Id, Description));
        }
Esempio n. 3
0
 public SPOTermStorePipeBind(SPOTermStore termStore)
 {
     _termStoreId = termStore.Id;
 }