private string GetSubject() { LocalizedString localizedString; if (this.template.ExecutingUser == null) { BaseGroupMessageComposer.Tracer.TraceDebug((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is unknown, returning subject without JoinedBy."); localizedString = ClientStrings.GroupMailboxAddedMemberNoJoinedBySubject(this.template.Group.DisplayName); } else if (this.template.ExecutingUser.Id.Equals(this.recipient.Id)) { BaseGroupMessageComposer.Tracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is same as user joining the group, returning subject for self-join. ExecutingUser.AdObjectId: {0}, NewMember.AdObjectId: {1}.", this.template.ExecutingUser.Id, this.recipient.Id); localizedString = ClientStrings.GroupMailboxAddedSelfMessageSubject(this.template.Group.DisplayName); } else { BaseGroupMessageComposer.Tracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is different than the one joining the group, returning subject for added member. ExecutingUser.AdObjectId: {0}, NewMember.AdObjectId: {1}.", this.template.ExecutingUser.Id, this.recipient.Id); localizedString = ClientStrings.GroupMailboxAddedMemberMessageSubject(this.template.Group.DisplayName); } return(localizedString.ToString(this.preferredCulture)); }