Esempio n. 1
0
 private Group GetAssociatedGroup(ClientContext context, ShAssociatedGroup assGroup)
 {
     switch (assGroup.Web)
     {
         case "Current":
             {
                 switch (assGroup.Type)
                 {
                     case "Visitors":
                         {
                             return context.Web.AssociatedVisitorGroup;
                         }
                     case "Members":
                         {
                             return context.Web.AssociatedMemberGroup;
                         }
                     case "Owners":
                         {
                             return context.Web.AssociatedOwnerGroup;
                         }
                 }
             }
             break;
         case "Root":
             {
                 switch (assGroup.Type)
                 {
                     case "Visitors":
                         {
                             return context.Site.RootWeb.AssociatedVisitorGroup;
                         }
                     case "Members":
                         {
                             return context.Site.RootWeb.AssociatedMemberGroup;
                         }
                     case "Owners":
                         {
                             return context.Site.RootWeb.AssociatedOwnerGroup;
                         }
                 }
             }
             break;
     }
     return null;
 }
Esempio n. 2
0
 public ShGroup()
 {
     Name            = "";
     AssociatedGroup = null;
 }
Esempio n. 3
0
 public ShGroup()
 {
     Name = "";
     AssociatedGroup = null;
 }