public static void EnsureAndRefreshMasterCollections() { var accountIDs = TBRAccountRoot.GetAllAccountIDs(); foreach (string accountID in accountIDs) { string acctLocation = "acc/" + accountID + "/"; VirtualOwner owner = VirtualOwner.FigureOwner(acctLocation); //CoreDomain.EnsureMasterCollections(owner); //CoreDomain.RefreshMasterCollections(owner); OIPDomain.EnsureMasterCollections(owner); OIPDomain.RefreshMasterCollections(owner); } var groupIDs = TBRGroupRoot.GetAllGroupIDs(); foreach (string groupID in groupIDs) { string grpLocation = "grp/" + groupID + "/"; VirtualOwner owner = VirtualOwner.FigureOwner(grpLocation); //CoreDomain.EnsureMasterCollections(owner); //CoreDomain.RefreshMasterCollections(owner); OIPDomain.EnsureMasterCollections(owner); OIPDomain.RefreshMasterCollections(owner); } }
private static void AddLegacyGroupWithInitiator(string groupID, string initiatorEmailAddress) { var groupRoot = TBRGroupRoot.CreateLegacyNewWithGroup(groupID); groupRoot.Group.JoinToGroup(initiatorEmailAddress, TBCollaboratorRole.InitiatorRoleValue); //groupRoot.Group.JoinToGroup("*****@*****.**", "moderator"); StorageSupport.StoreInformation(groupRoot); OIPDomain.EnsureMasterCollections(groupRoot.Group); OIPDomain.RefreshMasterCollections(groupRoot.Group); groupRoot.Group.ReconnectMastersAndCollectionsForOwner(); }