Beispiel #1
0
        protected override MailboxAssociation CreateMailboxAssociationFromItem(IPropertyBag item, bool setExtendedProperties = false)
        {
            GroupMailboxLocator         group = new GroupMailboxLocator(base.AdSession, base.AssociationStore.GetValueOrDefault <string>(item, MailboxAssociationBaseSchema.ExternalId, string.Empty), base.AssociationStore.GetValueOrDefault <string>(item, MailboxAssociationBaseSchema.LegacyDN, string.Empty));
            MailboxAssociationFromStore mailboxAssociationFromStore = new MailboxAssociationFromStore
            {
                User               = (base.MasterLocator as UserMailboxLocator),
                Group              = group,
                ItemId             = base.AssociationStore.GetValueOrDefault <VersionedId>(item, ItemSchema.Id, null),
                IsPin              = base.AssociationStore.GetValueOrDefault <bool>(item, MailboxAssociationBaseSchema.IsPin, false),
                IsMember           = base.AssociationStore.GetValueOrDefault <bool>(item, MailboxAssociationBaseSchema.IsMember, false),
                JoinDate           = base.AssociationStore.GetValueOrDefault <ExDateTime>(item, MailboxAssociationBaseSchema.JoinDate, default(ExDateTime)),
                PinDate            = base.AssociationStore.GetValueOrDefault <ExDateTime>(item, MailboxAssociationGroupSchema.PinDate, default(ExDateTime)),
                LastModified       = base.AssociationStore.GetValueOrDefault <ExDateTime>(item, StoreObjectSchema.LastModifiedTime, default(ExDateTime)),
                SyncedVersion      = base.AssociationStore.GetValueOrDefault <int>(item, MailboxAssociationBaseSchema.SyncedVersion, 0),
                CurrentVersion     = base.AssociationStore.GetValueOrDefault <int>(item, MailboxAssociationBaseSchema.CurrentVersion, 0),
                SyncedIdentityHash = base.AssociationStore.GetValueOrDefault <string>(item, MailboxAssociationBaseSchema.SyncedIdentityHash, null)
            };

            if (setExtendedProperties)
            {
                mailboxAssociationFromStore.SyncAttempts        = base.AssociationStore.GetValueOrDefault <int>(item, MailboxAssociationBaseSchema.SyncAttempts, 0);
                mailboxAssociationFromStore.SyncedSchemaVersion = base.AssociationStore.GetValueOrDefault <string>(item, MailboxAssociationBaseSchema.SyncedSchemaVersion, string.Empty);
                mailboxAssociationFromStore.LastSyncError       = base.AssociationStore.GetValueOrDefault <string>(item, MailboxAssociationBaseSchema.LastSyncError, string.Empty);
            }
            this.Tracer.TraceDebug <bool, MailboxAssociationFromStore>((long)this.GetHashCode(), "GroupAssociationAdaptor.CreateMailboxAssociationFromItem: Creating association from information found in store item. SetExtendedProperties={0}, Association={1}", setExtendedProperties, mailboxAssociationFromStore);
            return(mailboxAssociationFromStore);
        }
        public static GroupMailboxLocator Instantiate(IRecipientSession adSession, ADUser adUser)
        {
            GroupMailboxLocator groupMailboxLocator = new GroupMailboxLocator(adSession);

            groupMailboxLocator.InitializeFromAd(adUser);
            return(groupMailboxLocator);
        }
        internal GroupMailbox GetGroupMailbox(GroupMailboxLocator group, UserMailboxLocator user, bool loadAllDetails = false)
        {
            GroupMailbox mailbox;

            using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
            {
                UserAssociationAdaptor userAssociationAdaptor = new UserAssociationAdaptor(associationStore, this.adSession, group);
                MailboxAssociation     association            = userAssociationAdaptor.GetAssociation(user);
                GroupMailboxBuilder    groupMailboxBuilder    = new GroupMailboxBuilder(group);
                groupMailboxBuilder.BuildFromAssociation(association);
                if (loadAllDetails)
                {
                    ADUser aduser = group.FindAdUser();
                    if (aduser == null)
                    {
                        GroupMailboxAccessLayer.Tracer.TraceWarning <string>((long)this.GetHashCode(), "GroupMailboxAccessLayer::GetGroupMailbox. Unable to find group. LegacyDN={0}", group.LegacyDn);
                        throw new MailboxNotFoundException(ServerStrings.ADUserNotFoundId(group.LegacyDn));
                    }
                    GroupMailboxAccessLayer.Tracer.TraceDebug <string, bool, string>((long)this.GetHashCode(), "GroupMailboxAccessLayer::GetGroupMailbox. Found ADUser for group. LegacyDN={0}, IsCached={1}, OriginatingServer={2}", group.LegacyDn, aduser.IsCached, aduser.OriginatingServer);
                    groupMailboxBuilder.BuildFromDirectory(aduser);
                }
                mailbox = groupMailboxBuilder.Mailbox;
            }
            return(mailbox);
        }
        public static GroupMailboxLocator Instantiate(IRecipientSession adSession, ProxyAddress proxyAddress)
        {
            GroupMailboxLocator groupMailboxLocator = new GroupMailboxLocator(adSession);

            groupMailboxLocator.InitializeFromAd(proxyAddress);
            return(groupMailboxLocator);
        }
Beispiel #5
0
        internal static MasterMailboxType CreateMasterMailboxData(IMailboxLocator master)
        {
            ArgumentValidator.ThrowIfNull("master", master);
            ADUser            aduser            = master.FindAdUser();
            MasterMailboxType masterMailboxType = new MasterMailboxType
            {
                Alias       = aduser.Alias,
                DisplayName = aduser.DisplayName,
                SmtpAddress = aduser.PrimarySmtpAddress.ToString(),
                MailboxType = master.LocatorType
            };
            GroupMailboxLocator groupMailboxLocator = master as GroupMailboxLocator;

            if (groupMailboxLocator != null)
            {
                MailboxUrls mailboxUrls = new MailboxUrls(ExchangePrincipal.FromADUser(aduser, RemotingOptions.AllowCrossSite), false);
                masterMailboxType.GroupType          = EwsAssociationDataConverter.Convert(groupMailboxLocator.GetGroupType());
                masterMailboxType.GroupTypeSpecified = true;
                masterMailboxType.Description        = ((aduser.Description != null && aduser.Description.Count > 0) ? aduser.Description[0] : string.Empty);
                masterMailboxType.Photo            = groupMailboxLocator.GetThumbnailPhoto();
                masterMailboxType.SharePointUrl    = ((aduser.SharePointUrl != null) ? aduser.SharePointUrl.ToString() : string.Empty);
                masterMailboxType.InboxUrl         = mailboxUrls.InboxUrl;
                masterMailboxType.CalendarUrl      = mailboxUrls.CalendarUrl;
                masterMailboxType.DomainController = aduser.OriginatingServer;
            }
            return(masterMailboxType);
        }
Beispiel #6
0
 internal static GroupLocatorType Convert(GroupMailboxLocator locator)
 {
     ArgumentValidator.ThrowIfNull("locator", locator);
     return(new GroupLocatorType
     {
         ExternalDirectoryObjectId = locator.ExternalId,
         LegacyDn = locator.LegacyDn
     });
 }
        private IEnumerable <ADObjectId> GetGroupOwners(GroupMailboxLocator groupMailboxLocator)
        {
            MailboxCollectionBuilder.Tracer.TraceDebug <string>((long)this.GetHashCode(), "GroupMailboxAccessLayer::GetGroupOwners. Retrieving AD User for Group by LegacyDN={0}", groupMailboxLocator.LegacyDn);
            ADUser aduser = this.adSession.FindByLegacyExchangeDN(groupMailboxLocator.LegacyDn) as ADUser;

            if (aduser == null)
            {
                throw new MailboxNotFoundException(ServerStrings.InvalidAddressError(groupMailboxLocator.LegacyDn));
            }
            return(aduser.Owners);
        }
 public IEnumerable <UserMailbox> GetEscalatedMembers(GroupMailboxLocator group, bool loadAllDetails = false)
 {
     using (IAssociationStore storeProvider = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         foreach (UserMailbox mailbox in this.GetEscalatedMembersInternal(storeProvider, group, loadAllDetails))
         {
             yield return(mailbox);
         }
     }
     yield break;
 }
        public IEnumerable <UserMailbox> BuildUserMailboxes(GroupMailboxLocator groupLocator, IEnumerable <MailboxAssociation> associations, bool loadAllDetails)
        {
            IEnumerable <ADObjectId> owners = loadAllDetails ? this.GetGroupOwners(groupLocator) : null;
            IEnumerable <IMailboxBuilder <UserMailbox> > enumerable = from association in associations
                                                                      select new UserMailboxBuilder(association.User, owners).BuildFromAssociation(association);

            if (loadAllDetails)
            {
                return(this.BuildMailboxesFromAD <UserMailbox>(enumerable, UserMailboxBuilder.AllADProperties));
            }
            return(from builder in enumerable
                   select builder.Mailbox);
        }
 public void SetLastVisitedDate(UserMailboxLocator user, GroupMailboxLocator group, ExDateTime lastVisitedDate)
 {
     using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         this.LogCommandExecution("SetLastVisitedDate", group, new UserMailboxLocator[]
         {
             user
         });
         UserAssociationAdaptor masterAdaptor      = new UserAssociationAdaptor(associationStore, this.adSession, group);
         SetLastVisitedDate     setLastVisitedDate = new SetLastVisitedDate(this.Logger, lastVisitedDate, masterAdaptor, user);
         setLastVisitedDate.Execute();
     }
 }
 public void SetGroupPinState(UserMailboxLocator user, GroupMailboxLocator group, bool isPinned, bool isModernGroupsNewArchitecture)
 {
     using (IAssociationStore associationStore = this.storeProviderBuilder.Create(user, this.PerformanceTracker))
     {
         this.LogCommandExecution(isPinned ? "PinGroup" : "UnpinGroup", group, new UserMailboxLocator[]
         {
             user
         });
         GroupAssociationAdaptor masterAdaptor    = new GroupAssociationAdaptor(associationStore, this.adSession, user);
         SetGroupPinState        setGroupPinState = new SetGroupPinState(this.Logger, null, isPinned, masterAdaptor, group, this.PerformanceTracker, isModernGroupsNewArchitecture);
         setGroupPinState.Execute();
     }
 }
 public void SetEscalate(UserMailboxLocator user, GroupMailboxLocator group, bool shouldEscalate, SmtpAddress userSmtpAddress, int maxNumberOfSubscribers = 400)
 {
     using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         this.LogCommandExecution("SetEscalate", group, new UserMailboxLocator[]
         {
             user
         });
         UserAssociationAdaptor masterAdaptor = new UserAssociationAdaptor(associationStore, this.adSession, group);
         SetEscalate            setEscalate   = new SetEscalate(this.Logger, shouldEscalate, userSmtpAddress, masterAdaptor, user, maxNumberOfSubscribers);
         setEscalate.Execute();
     }
 }
 public IEnumerable <UserMailbox> GetMembers(GroupMailboxLocator group, IEnumerable <UserMailboxLocator> users, bool loadAllDetails = false)
 {
     using (IAssociationStore storeProvider = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         UserAssociationAdaptor    adaptor   = new UserAssociationAdaptor(storeProvider, this.adSession, group);
         IEnumerable <UserMailbox> mailboxes = this.mailboxCollectionBuilder.BuildUserMailboxes(group, from u in users
                                                                                                select new GetMemberAssociation(adaptor, u).Execute(), loadAllDetails);
         foreach (UserMailbox mailbox in mailboxes)
         {
             yield return(mailbox);
         }
     }
     yield break;
 }
 public IEnumerable <UserMailbox> GetGroupPinners(GroupMailboxLocator group, bool loadAllDetails = false)
 {
     using (IAssociationStore storeProvider = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         UserAssociationAdaptor           adaptor         = new UserAssociationAdaptor(storeProvider, this.adSession, group);
         GetPinAssociations               command         = new GetPinAssociations(adaptor);
         IEnumerable <MailboxAssociation> pinAssociations = command.Execute(null);
         IEnumerable <UserMailbox>        mailboxes       = this.mailboxCollectionBuilder.BuildUserMailboxes(group, pinAssociations, loadAllDetails);
         foreach (UserMailbox mailbox in mailboxes)
         {
             yield return(mailbox);
         }
     }
     yield break;
 }
        public UserMailbox GetMember(GroupMailboxLocator group, UserMailboxLocator user, bool loadAllDetails = false)
        {
            UserMailbox result;

            using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
            {
                UserAssociationAdaptor adaptor = new UserAssociationAdaptor(associationStore, this.adSession, group);
                GetMemberAssociation   getMemberAssociation = new GetMemberAssociation(adaptor, user);
                MailboxAssociation     item = getMemberAssociation.Execute();
                result = this.mailboxCollectionBuilder.BuildUserMailboxes(group, new List <MailboxAssociation>(1)
                {
                    item
                }, loadAllDetails).FirstOrDefault <UserMailbox>();
            }
            return(result);
        }
Beispiel #16
0
        internal static MailboxLocatorType Convert(IMailboxLocator locator)
        {
            ArgumentValidator.ThrowIfNull("locator", locator);
            GroupMailboxLocator groupMailboxLocator = locator as GroupMailboxLocator;

            if (groupMailboxLocator != null)
            {
                return(EwsAssociationDataConverter.Convert(groupMailboxLocator));
            }
            UserMailboxLocator userMailboxLocator = locator as UserMailboxLocator;

            if (userMailboxLocator != null)
            {
                return(EwsAssociationDataConverter.Convert(userMailboxLocator));
            }
            throw new NotImplementedException(string.Format("Conversion of '{0}' is not yet supported.", locator.GetType()));
        }
 private void LogCommandExecution(string commandDescription, GroupMailboxLocator group, params UserMailboxLocator[] users)
 {
     this.Logger.LogEvent(new SchemaBasedLogEvent <MailboxAssociationLogSchema.CommandExecution>
     {
         {
             MailboxAssociationLogSchema.CommandExecution.Command,
             commandDescription
         },
         {
             MailboxAssociationLogSchema.CommandExecution.GroupMailbox,
             group
         },
         {
             MailboxAssociationLogSchema.CommandExecution.UserMailboxes,
             users
         }
     });
 }
 public QueuedInProcessAssociationReplicator(GroupMailboxLocator mailbox, IRecipientSession adSession, string replicationServerFqdn, string clientInfoString, Func <IExtensibleLogger, IMailboxAssociationPerformanceTracker, IAssociationReplicator> immediateReplicatorCreator, Func <IExtensibleLogger, string, IStoreBuilder> storeBuilderCreator, Func <IExtensibleLogger, string, IReplicationAssistantInvoker> replicationAssistantInvokerCreator, Func <IDiagnosticsFrameFactory <IExtensibleLogger, IMailboxAssociationPerformanceTracker> > diagnosticsFrameFactoryCreator)
 {
     ArgumentValidator.ThrowIfNull("mailbox", mailbox);
     ArgumentValidator.ThrowIfNull("adSession", adSession);
     ArgumentValidator.ThrowIfNullOrWhiteSpace("clientInfoString", clientInfoString);
     ArgumentValidator.ThrowIfNull("immediateReplicatorCreator", immediateReplicatorCreator);
     ArgumentValidator.ThrowIfNull("storeBuilderCreator", storeBuilderCreator);
     ArgumentValidator.ThrowIfNull("replicationAssistantInvokerCreator", replicationAssistantInvokerCreator);
     ArgumentValidator.ThrowIfNull("diagnosticsFrameFactoryCreator", diagnosticsFrameFactoryCreator);
     this.mailbox                            = mailbox;
     this.adSession                          = adSession;
     this.replicationServerFqdn              = ((!string.IsNullOrWhiteSpace(replicationServerFqdn)) ? replicationServerFqdn : LocalServerCache.LocalServerFqdn);
     this.clientInfoString                   = clientInfoString;
     this.immediateReplicatorCreator         = immediateReplicatorCreator;
     this.storeBuilderCreator                = storeBuilderCreator;
     this.replicationAssistantInvokerCreator = replicationAssistantInvokerCreator;
     this.diagnosticsFrameFactoryCreator     = diagnosticsFrameFactoryCreator;
     this.pendingAssociations                = new Queue <MailboxAssociation>();
 }
        public IEnumerable <UserMailbox> GetUnseenMembers(GroupMailboxLocator group, IEnumerable <UserMailboxLocator> users)
        {
            IEnumerable <UserMailbox> result;

            using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
            {
                UnseenDataUserAssociationAdaptor        adaptor = new UnseenDataUserAssociationAdaptor(associationStore, this.adSession, group);
                GetMembershipAssociations               getMembershipAssociations = new GetMembershipAssociations(adaptor);
                IEnumerable <MailboxAssociation>        enumerable = getMembershipAssociations.Execute(null);
                Dictionary <string, MailboxAssociation> dictionary = new Dictionary <string, MailboxAssociation>(enumerable.Count <MailboxAssociation>());
                foreach (MailboxAssociation mailboxAssociation in enumerable)
                {
                    if (string.IsNullOrEmpty(mailboxAssociation.User.ExternalId))
                    {
                        GroupMailboxAccessLayer.LogWarning(this.Logger, "GetUnseenMembers", string.Format("External Id is null or empty. LegacyDn - {0}", mailboxAssociation.User.LegacyDn));
                    }
                    else if (dictionary.ContainsKey(mailboxAssociation.User.ExternalId))
                    {
                        GroupMailboxAccessLayer.LogWarning(this.Logger, "GetUnseenMembers", string.Format("Duplicate External Id. ExternalId - {0}. LegacyDn - {1}", mailboxAssociation.User.ExternalId, mailboxAssociation.User.LegacyDn));
                    }
                    else
                    {
                        dictionary.Add(mailboxAssociation.User.ExternalId, mailboxAssociation);
                    }
                }
                List <UserMailbox> list = new List <UserMailbox>();
                foreach (UserMailboxLocator userMailboxLocator in users)
                {
                    MailboxAssociation association = null;
                    if (!dictionary.TryGetValue(userMailboxLocator.ExternalId, out association))
                    {
                        association = this.CreateMailboxAssociationWithDefaultValues(userMailboxLocator, group);
                    }
                    UserMailboxBuilder userMailboxBuilder = new UserMailboxBuilder(userMailboxLocator, null);
                    list.Add(userMailboxBuilder.BuildFromAssociation(association).Mailbox);
                }
                result = list;
            }
            return(result);
        }
 public IEnumerable <UserMailbox> GetMembers(GroupMailboxLocator group, bool loadAllDetails = false, int?maxItems = null)
 {
     using (IAssociationStore storeProvider = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
     {
         UserAssociationAdaptor                 adaptor       = new UserAssociationAdaptor(storeProvider, this.adSession, group);
         GetAssociationCommand                  command       = new GetMembershipAssociations(adaptor);
         IEnumerable <MailboxAssociation>       members       = command.Execute(maxItems);
         RpcAssociationReplicator               rpcReplicator = new RpcAssociationReplicator(this.Logger, storeProvider.ServerFullyQualifiedDomainName);
         ReplicatorEnabledAssociationEnumerator eventualConsistencyEnumerator = new ReplicatorEnabledAssociationEnumerator(rpcReplicator, members, storeProvider);
         try
         {
             IEnumerable <UserMailbox> mailboxes = this.mailboxCollectionBuilder.BuildUserMailboxes(group, eventualConsistencyEnumerator, loadAllDetails);
             foreach (UserMailbox mailbox in mailboxes)
             {
                 yield return(mailbox);
             }
         }
         finally
         {
             eventualConsistencyEnumerator.TriggerReplication(adaptor);
         }
     }
     yield break;
 }
 public SetGroupPinState(IExtensibleLogger logger, IAssociationReplicator associationReplicator, bool pin, IGroupAssociationAdaptor masterAdaptor, GroupMailboxLocator itemLocator, IMailboxAssociationPerformanceTracker performanceTracker = null, bool isModernGroupsNewArchitecture = false) : base(logger, masterAdaptor, new IMailboxLocator[]
 {
     itemLocator
 })
 {
     this.associationReplicator = associationReplicator;
     this.pin = pin;
     this.performanceTracker            = performanceTracker;
     this.isModernGroupsNewArchitecture = isModernGroupsNewArchitecture;
 }
Beispiel #22
0
 public GroupMailboxBuilder(GroupMailboxLocator locator)
 {
     ArgumentValidator.ThrowIfNull("locator", locator);
     this.Mailbox = new GroupMailbox(locator);
 }
Beispiel #23
0
 public UserAssociationAdaptor(IAssociationStore associationStore, IRecipientSession adSession, GroupMailboxLocator currentGroup) : base(associationStore, adSession, currentGroup)
 {
 }
        private MailboxAssociation CreateMailboxAssociationWithDefaultValues(UserMailboxLocator user, GroupMailboxLocator group)
        {
            MailboxAssociation mailboxAssociation = new MailboxAssociation
            {
                User            = user,
                Group           = group,
                UserSmtpAddress = SmtpAddress.Empty,
                IsMember        = false,
                ShouldEscalate  = false,
                IsPin           = false,
                JoinedBy        = string.Empty,
                JoinDate        = default(ExDateTime),
                LastVisitedDate = default(ExDateTime)
            };

            GroupMailboxAccessLayer.Tracer.TraceDebug <MailboxAssociation>((long)this.GetHashCode(), "GroupMailboxAccessLayer.CreateMailboxAssociationWithDefaultValues: Creating new association with default values. Association={0}", mailboxAssociation);
            return(mailboxAssociation);
        }
        private IEnumerable <UserMailbox> GetEscalatedMembersInternal(IAssociationStore storeProvider, GroupMailboxLocator group, bool loadAllDetails = false)
        {
            UserAssociationAdaptor           adaptor = new UserAssociationAdaptor(storeProvider, this.adSession, group);
            GetEscalatedAssociations         getEscalatedAssociations = new GetEscalatedAssociations(adaptor);
            IEnumerable <MailboxAssociation> associations             = getEscalatedAssociations.Execute(null);

            return(this.mailboxCollectionBuilder.BuildUserMailboxes(group, associations, loadAllDetails));
        }
 public void ReplicateOutOfSyncAssociation(GroupMailboxLocator masterLocator)
 {
     this.ReplicateOutOfSyncAssociation((IAssociationStore storeProvider) => new UserAssociationAdaptor(storeProvider, this.adSession, masterLocator), masterLocator);
 }
        public void SetMembershipState(ADRecipient joinedBy, UserMailboxLocator[] joiningUsers, UserMailboxLocator[] departingUsers, GroupMailboxLocator group)
        {
            string joinedBy2 = string.Empty;

            if (joinedBy != null)
            {
                joinedBy2 = ((SmtpAddress)joinedBy[ADRecipientSchema.PrimarySmtpAddress]).ToString();
            }
            using (IAssociationStore associationStore = this.storeProviderBuilder.Create(group, this.PerformanceTracker))
            {
                ADUser groupMailbox = group.FindAdUser();
                WelcomeToGroupMessageTemplate        messageComposerBuilder  = new WelcomeToGroupMessageTemplate(groupMailbox, associationStore.MailboxOwner, joinedBy);
                EmailNotificationHandler             joinNotificationHandler = new EmailNotificationHandler(groupMailbox, associationStore.MailboxOwner, this.clientString, messageComposerBuilder);
                QueuedInProcessAssociationReplicator associationReplicator   = new QueuedInProcessAssociationReplicator(group, this.adSession, associationStore.ServerFullyQualifiedDomainName, this.clientString);
                try
                {
                    UserAssociationAdaptor userAssociationAdaptor = new UserAssociationAdaptor(associationStore, this.adSession, group);
                    if (departingUsers != null && departingUsers.Length > 0)
                    {
                        this.LogCommandExecution("LeaveGroup", group, departingUsers);
                        SetUserMembershipState setUserMembershipState = new SetUserMembershipState(this.Logger, associationReplicator, false, joinedBy2, userAssociationAdaptor, this.adSession, departingUsers);
                        setUserMembershipState.Execute();
                    }
                    if (joiningUsers != null && joiningUsers.Length > 0)
                    {
                        this.LogCommandExecution("JoinGroup", group, joiningUsers);
                        userAssociationAdaptor.OnAfterJoin += joinNotificationHandler.AddNotificationRecipient;
                        SetUserMembershipState setUserMembershipState2 = new SetUserMembershipState(this.Logger, associationReplicator, true, joinedBy2, userAssociationAdaptor, this.adSession, joiningUsers);
                        setUserMembershipState2.Execute();
                        userAssociationAdaptor.OnAfterJoin -= joinNotificationHandler.AddNotificationRecipient;
                    }
                }
                finally
                {
                    Task.Run(delegate()
                    {
                        associationReplicator.ReplicateQueuedAssociations();
                    }).ContinueWith(delegate(Task t)
                    {
                        joinNotificationHandler.SendNotification();
                    });
                }
            }
        }
 public QueuedInProcessAssociationReplicator(GroupMailboxLocator mailbox, IRecipientSession adSession, string replicationServerFqdn, string clientInfoString) : this(mailbox, adSession, replicationServerFqdn, clientInfoString, (IExtensibleLogger logger, IMailboxAssociationPerformanceTracker performanceTracker) => new InProcessAssociationReplicator(logger, performanceTracker, OpenAsAdminOrSystemServiceBudgetTypeType.Unthrottled), (IExtensibleLogger logger, string clientString) => new StoreBuilder(null, new XSOFactory(), logger, clientString), (IExtensibleLogger logger, string targetServerFqdn) => new ReplicationAssistantInvoker(targetServerFqdn, logger), () => MailboxAssociationDiagnosticsFrameFactory.Default)
 {
 }
 public void SetMembershipState(ADRecipient joinedBy, UserMailboxLocator[] users, GroupMailboxLocator group, bool isMember)
 {
     UserMailboxLocator[] joiningUsers   = isMember ? users : null;
     UserMailboxLocator[] departingUsers = (!isMember) ? users : null;
     this.SetMembershipState(joinedBy, joiningUsers, departingUsers, group);
 }
Beispiel #30
0
 public GroupMailbox(GroupMailboxLocator locator)
 {
     this.Locator = locator;
 }