public bool Equals(GroupOptionalConversation input) { if (input == null) { return(false); } return (( GroupId == input.GroupId || (GroupId.Equals(input.GroupId)) ) && ( ConversationId == input.ConversationId || (ConversationId.Equals(input.ConversationId)) ) && ( ChatEnabled == input.ChatEnabled || (ChatEnabled != null && ChatEnabled.Equals(input.ChatEnabled)) ) && ( ChatName == input.ChatName || (ChatName != null && ChatName.Equals(input.ChatName)) ) && ( ChatSecurity == input.ChatSecurity || (ChatSecurity != null && ChatSecurity.Equals(input.ChatSecurity)) )); }
public bool Equals(ForumRecruitmentDetail input) { if (input == null) { return(false); } return (( TopicId == input.TopicId || (TopicId.Equals(input.TopicId)) ) && ( MicrophoneRequired == input.MicrophoneRequired || (MicrophoneRequired != null && MicrophoneRequired.Equals(input.MicrophoneRequired)) ) && ( Intensity == input.Intensity || (Intensity != null && Intensity.Equals(input.Intensity)) ) && ( Tone == input.Tone || (Tone != null && Tone.Equals(input.Tone)) ) && ( Approved == input.Approved || (Approved != null && Approved.Equals(input.Approved)) ) && ( ConversationId == input.ConversationId || (ConversationId.Equals(input.ConversationId)) ) && ( PlayerSlotsTotal == input.PlayerSlotsTotal || (PlayerSlotsTotal.Equals(input.PlayerSlotsTotal)) ) && ( PlayerSlotsRemaining == input.PlayerSlotsRemaining || (PlayerSlotsRemaining.Equals(input.PlayerSlotsRemaining)) ) && ( Fireteam == input.Fireteam || (Fireteam != null && Fireteam.SequenceEqual(input.Fireteam)) ) && ( KickedPlayerIds == input.KickedPlayerIds || (KickedPlayerIds != null && KickedPlayerIds.SequenceEqual(input.KickedPlayerIds)) )); }
/// <summary> /// Returns true if Conversation instances are equal /// </summary> /// <param name="other">Instance of Conversation to be compared</param> /// <returns>Boolean</returns> public bool Equals(Conversation other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ConversationId == other.ConversationId || ConversationId != null && ConversationId.Equals(other.ConversationId) ) && ( Token == other.Token || Token != null && Token.Equals(other.Token) ) && ( ExpiresIn == other.ExpiresIn || ExpiresIn != null && ExpiresIn.Equals(other.ExpiresIn) ) && ( StreamUrl == other.StreamUrl || StreamUrl != null && StreamUrl.Equals(other.StreamUrl) ) && ( ReferenceGrammarId == other.ReferenceGrammarId || ReferenceGrammarId != null && ReferenceGrammarId.Equals(other.ReferenceGrammarId) ) && ( ETag == other.ETag || ETag != null && ETag.Equals(other.ETag) )); }
public bool Equals(GroupV2 input) { if (input == null) { return(false); } return (( GroupId == input.GroupId || (GroupId.Equals(input.GroupId)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( GroupType == input.GroupType || (GroupType != null && GroupType.Equals(input.GroupType)) ) && ( MembershipIdCreated == input.MembershipIdCreated || (MembershipIdCreated.Equals(input.MembershipIdCreated)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( ModificationDate == input.ModificationDate || (ModificationDate != null && ModificationDate.Equals(input.ModificationDate)) ) && ( About == input.About || (About != null && About.Equals(input.About)) ) && ( Tags == input.Tags || (Tags != null && Tags.SequenceEqual(input.Tags)) ) && ( MemberCount == input.MemberCount || (MemberCount.Equals(input.MemberCount)) ) && ( IsPublic == input.IsPublic || (IsPublic != null && IsPublic.Equals(input.IsPublic)) ) && ( IsPublicTopicAdminOnly == input.IsPublicTopicAdminOnly || (IsPublicTopicAdminOnly != null && IsPublicTopicAdminOnly.Equals(input.IsPublicTopicAdminOnly)) ) && ( Motto == input.Motto || (Motto != null && Motto.Equals(input.Motto)) ) && ( AllowChat == input.AllowChat || (AllowChat != null && AllowChat.Equals(input.AllowChat)) ) && ( IsDefaultPostPublic == input.IsDefaultPostPublic || (IsDefaultPostPublic != null && IsDefaultPostPublic.Equals(input.IsDefaultPostPublic)) ) && ( ChatSecurity == input.ChatSecurity || (ChatSecurity != null && ChatSecurity.Equals(input.ChatSecurity)) ) && ( Locale == input.Locale || (Locale != null && Locale.Equals(input.Locale)) ) && ( AvatarImageIndex == input.AvatarImageIndex || (AvatarImageIndex.Equals(input.AvatarImageIndex)) ) && ( Homepage == input.Homepage || (Homepage != null && Homepage.Equals(input.Homepage)) ) && ( MembershipOption == input.MembershipOption || (MembershipOption != null && MembershipOption.Equals(input.MembershipOption)) ) && ( DefaultPublicity == input.DefaultPublicity || (DefaultPublicity != null && DefaultPublicity.Equals(input.DefaultPublicity)) ) && ( Theme == input.Theme || (Theme != null && Theme.Equals(input.Theme)) ) && ( BannerPath == input.BannerPath || (BannerPath != null && BannerPath.Equals(input.BannerPath)) ) && ( AvatarPath == input.AvatarPath || (AvatarPath != null && AvatarPath.Equals(input.AvatarPath)) ) && ( ConversationId == input.ConversationId || (ConversationId.Equals(input.ConversationId)) ) && ( EnableInvitationMessagingForAdmins == input.EnableInvitationMessagingForAdmins || (EnableInvitationMessagingForAdmins != null && EnableInvitationMessagingForAdmins.Equals(input.EnableInvitationMessagingForAdmins)) ) && ( BanExpireDate == input.BanExpireDate || (BanExpireDate != null && BanExpireDate.Equals(input.BanExpireDate)) ) && ( Features == input.Features || (Features != null && Features.Equals(input.Features)) ) && ( ClanInfo == input.ClanInfo || (ClanInfo != null && ClanInfo.Equals(input.ClanInfo)) )); }
private static bool SearchByTopic(IXSOFactory xsoFactory, IMailboxSession session, ICorePropertyBag persistPropertyBag, ConversationIndexTrackingEx indexTrackingEx, out IStorePropertyBag foundPropertyBag, out bool didConversationIdMatch, out bool didReferencesMatch, params PropertyDefinition[] propsToReturn) { foundPropertyBag = null; didConversationIdMatch = false; didReferencesMatch = false; Util.ThrowOnNullArgument(session, "session"); Util.ThrowOnNullArgument(persistPropertyBag, "persistPropertyBag"); Util.ThrowOnNullArgument(propsToReturn, "propsToReturn"); ICollection <PropertyDefinition> properties = InternalSchema.Combine <PropertyDefinition>(propsToReturn, new PropertyDefinition[] { ItemSchema.ConversationTopicHash }); string incomingConversationTopic = persistPropertyBag.GetValueOrDefault <string>(ItemSchema.ConversationTopic); ConversationIndex conversationIndex; bool isValidIncomingIndex = ConversationIndex.TryCreate(persistPropertyBag.TryGetProperty(ItemSchema.ConversationIndex) as byte[], out conversationIndex); ConversationId incomingConversationId = isValidIncomingIndex ? ConversationId.Create(conversationIndex.Guid) : null; if (incomingConversationTopic == null) { return(false); } bool didConversationIdMatchLocal = false; bool didReferencesMatchLocal = false; int incomingConversationTopicHash = (int)AllItemsFolderHelper.GetHashValue(incomingConversationTopic); Stopwatch stopwatch = Stopwatch.StartNew(); IStorePropertyBag storePropertyBag = xsoFactory.RunQueryOnAllItemsFolder <IStorePropertyBag>(session, AllItemsFolderHelper.SupportedSortBy.ConversationTopicHash, incomingConversationTopicHash, null, delegate(QueryResult queryResult) { bool flag = queryResult.SeekToCondition(SeekReference.OriginBeginning, new ComparisonFilter(ComparisonOperator.Equal, ItemSchema.ConversationTopicHash, incomingConversationTopicHash)); if (flag) { IStorePropertyBag storePropertyBag2 = null; for (int i = 0; i < 5; i++) { IStorePropertyBag[] propertyBags = queryResult.GetPropertyBags(1); if (propertyBags.Length != 1) { break; } int?num = propertyBags[0].TryGetProperty(ItemSchema.ConversationTopicHash) as int?; if (num == null || num.Value != incomingConversationTopicHash) { break; } string foundTopic = propertyBags[0].TryGetProperty(ItemSchema.ConversationTopic) as string; if (ConversationIndex.CompareTopics(incomingConversationTopic, foundTopic)) { if (storePropertyBag2 == null) { storePropertyBag2 = propertyBags[0]; } ConversationIndex conversationIndex2; bool flag2 = ConversationIndex.TryCreate(propertyBags[0].TryGetProperty(ItemSchema.ConversationIndex) as byte[], out conversationIndex2); if (flag2) { if (isValidIncomingIndex) { ConversationId conversationId = ConversationId.Create(conversationIndex2.Guid); if (conversationId.Equals(incomingConversationId)) { didConversationIdMatchLocal = true; return(propertyBags[0]); } } else if (AggregationByItemClassReferencesSubjectProcessor.MatchMessageIdWithReferences(persistPropertyBag, propertyBags[0])) { didReferencesMatchLocal = true; return(propertyBags[0]); } } } if (!queryResult.SeekToCondition(SeekReference.OriginCurrent, new ComparisonFilter(ComparisonOperator.Equal, ItemSchema.ConversationTopicHash, incomingConversationTopicHash))) { break; } } if (storePropertyBag2 != null) { return(storePropertyBag2); } } return(null); }, properties); stopwatch.Stop(); if (indexTrackingEx != null) { indexTrackingEx.Trace("SBT", stopwatch.ElapsedMilliseconds.ToString()); } if (storePropertyBag != null) { foundPropertyBag = storePropertyBag; didConversationIdMatch = didConversationIdMatchLocal; didReferencesMatch = didReferencesMatchLocal; return(true); } return(false); }
protected bool Equals(Conversation other) => ConversationId.Equals(other.ConversationId);