public void NoDuplicatesAllowed() { var Capabilities1 = new Capabilities { Capability.ListBuckets, Capability.ListBuckets, Capability.ListFiles, Capability.ReadFiles, Capability.ShareFiles, Capability.WriteFiles, Capability.DeleteFiles }; var Capabilities2 = new Capabilities { Capability.ListBuckets, Capability.ListFiles, Capability.ReadFiles, Capability.ShareFiles, Capability.WriteFiles, Capability.DeleteFiles }; Assert.True(Capabilities1.Equals(Capabilities2)); Assert.Equal(Capabilities1.GetHashCode(), Capabilities2.GetHashCode()); }
public bool Equals(GroupFeatures input) { if (input == null) { return(false); } return (( MaximumMembers == input.MaximumMembers || (MaximumMembers.Equals(input.MaximumMembers)) ) && ( MaximumMembershipsOfGroupType == input.MaximumMembershipsOfGroupType || (MaximumMembershipsOfGroupType.Equals(input.MaximumMembershipsOfGroupType)) ) && ( Capabilities == input.Capabilities || (Capabilities != null && Capabilities.Equals(input.Capabilities)) ) && ( MembershipTypes == input.MembershipTypes || (MembershipTypes != null && MembershipTypes.SequenceEqual(input.MembershipTypes)) ) && ( InvitePermissionOverride == input.InvitePermissionOverride || (InvitePermissionOverride != null && InvitePermissionOverride.Equals(input.InvitePermissionOverride)) ) && ( UpdateCulturePermissionOverride == input.UpdateCulturePermissionOverride || (UpdateCulturePermissionOverride != null && UpdateCulturePermissionOverride.Equals(input.UpdateCulturePermissionOverride)) ) && ( HostGuidedGamePermissionOverride == input.HostGuidedGamePermissionOverride || (HostGuidedGamePermissionOverride != null && HostGuidedGamePermissionOverride.Equals(input.HostGuidedGamePermissionOverride)) ) && ( UpdateBannerPermissionOverride == input.UpdateBannerPermissionOverride || (UpdateBannerPermissionOverride != null && UpdateBannerPermissionOverride.Equals(input.UpdateBannerPermissionOverride)) ) && ( JoinLevel == input.JoinLevel || (JoinLevel != null && JoinLevel.Equals(input.JoinLevel)) )); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is Location other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((Address == null && other.Address == null) || (Address?.Equals(other.Address) == true)) && ((Timezone == null && other.Timezone == null) || (Timezone?.Equals(other.Timezone) == true)) && ((Capabilities == null && other.Capabilities == null) || (Capabilities?.Equals(other.Capabilities) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((MerchantId == null && other.MerchantId == null) || (MerchantId?.Equals(other.MerchantId) == true)) && ((Country == null && other.Country == null) || (Country?.Equals(other.Country) == true)) && ((LanguageCode == null && other.LanguageCode == null) || (LanguageCode?.Equals(other.LanguageCode) == true)) && ((Currency == null && other.Currency == null) || (Currency?.Equals(other.Currency) == true)) && ((PhoneNumber == null && other.PhoneNumber == null) || (PhoneNumber?.Equals(other.PhoneNumber) == true)) && ((BusinessName == null && other.BusinessName == null) || (BusinessName?.Equals(other.BusinessName) == true)) && ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) && ((WebsiteUrl == null && other.WebsiteUrl == null) || (WebsiteUrl?.Equals(other.WebsiteUrl) == true)) && ((BusinessHours == null && other.BusinessHours == null) || (BusinessHours?.Equals(other.BusinessHours) == true)) && ((BusinessEmail == null && other.BusinessEmail == null) || (BusinessEmail?.Equals(other.BusinessEmail) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((TwitterUsername == null && other.TwitterUsername == null) || (TwitterUsername?.Equals(other.TwitterUsername) == true)) && ((InstagramUsername == null && other.InstagramUsername == null) || (InstagramUsername?.Equals(other.InstagramUsername) == true)) && ((FacebookUrl == null && other.FacebookUrl == null) || (FacebookUrl?.Equals(other.FacebookUrl) == true)) && ((Coordinates == null && other.Coordinates == null) || (Coordinates?.Equals(other.Coordinates) == true)) && ((LogoUrl == null && other.LogoUrl == null) || (LogoUrl?.Equals(other.LogoUrl) == true)) && ((PosBackgroundUrl == null && other.PosBackgroundUrl == null) || (PosBackgroundUrl?.Equals(other.PosBackgroundUrl) == true)) && ((Mcc == null && other.Mcc == null) || (Mcc?.Equals(other.Mcc) == true)) && ((FullFormatLogoUrl == null && other.FullFormatLogoUrl == null) || (FullFormatLogoUrl?.Equals(other.FullFormatLogoUrl) == true))); }
public bool Equals(WaveOutDevice other) { return(Capabilities.Equals(other.Capabilities)); }
public bool Equals(GroupV2Card 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)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( About == input.About || (About != null && About.Equals(input.About)) ) && ( Motto == input.Motto || (Motto != null && Motto.Equals(input.Motto)) ) && ( MemberCount == input.MemberCount || (MemberCount.Equals(input.MemberCount)) ) && ( Locale == input.Locale || (Locale != null && Locale.Equals(input.Locale)) ) && ( MembershipOption == input.MembershipOption || (MembershipOption != null && MembershipOption.Equals(input.MembershipOption)) ) && ( Capabilities == input.Capabilities || (Capabilities != null && Capabilities.Equals(input.Capabilities)) ) && ( ClanInfo == input.ClanInfo || (ClanInfo != null && ClanInfo.Equals(input.ClanInfo)) ) && ( AvatarPath == input.AvatarPath || (AvatarPath != null && AvatarPath.Equals(input.AvatarPath)) ) && ( Theme == input.Theme || (Theme != null && Theme.Equals(input.Theme)) )); }