Beispiel #1
0
 public override bool Equals(object obj)
 {
     return(obj is ShoppingList list &&
            Name == list.Name &&
            ListDate == list.ListDate &&
            OwnerId.Equals(list.OwnerId) &&
            ItemsEqual(list.Items));
 }
Beispiel #2
0
        public void Init(int netId, string ownerId, GameObject obj)
        {
            this.NetId   = netId;
            this.OwnerId = ownerId;
            this.Obj     = obj;

            IsMine = OwnerId.Equals(UserManager.Instance.userID);
        }
Beispiel #3
0
        public bool Equals(Vote second)
        {
            // If parameter is null return false:
            if ((object)second == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return(OwnerId.Equals(second.OwnerId) && subjectId == second.subjectId);
        }
Beispiel #4
0
        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            Vote second = obj as Vote;

            if ((System.Object)second == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return(OwnerId.Equals(second.OwnerId) && subjectId == second.subjectId);
        }
Beispiel #5
0
 public bool Equals(Guild other)
 {
     return(Id.Equals(other.Id) && Name == other.Name && Icon == other.Icon && Splash == other.Splash &&
            DiscoverySplash == other.DiscoverySplash && Owner == other.Owner && OwnerId.Equals(other.OwnerId) &&
            Permissions == other.Permissions && Region == other.Region &&
            Nullable.Equals(AfkChannelId, other.AfkChannelId) && AfkTimeout == other.AfkTimeout &&
            EmbedEnabled == other.EmbedEnabled && Nullable.Equals(EmbedChannelId, other.EmbedChannelId) &&
            VerificationLevel == other.VerificationLevel &&
            DefaultMessageNotifictations == other.DefaultMessageNotifictations &&
            ExplicitContentFilter == other.ExplicitContentFilter && Equals(Roles, other.Roles) &&
            Equals(Emojis, other.Emojis) && Equals(Features, other.Features) && MFALevel == other.MFALevel &&
            Nullable.Equals(ApplicationId, other.ApplicationId) && WidgedEnabled == other.WidgedEnabled &&
            Nullable.Equals(WidgedChnanelId, other.WidgedChnanelId) &&
            Nullable.Equals(SystemChannelId, other.SystemChannelId) &&
            SystemChannelFlags == other.SystemChannelFlags &&
            Nullable.Equals(RulesChannelId, other.RulesChannelId) &&
            Nullable.Equals(JoinedAt, other.JoinedAt) && Large == other.Large &&
            Unavailable == other.Unavailable && MemberCount == other.MemberCount &&
            Equals(VoiceStates, other.VoiceStates) && Equals(Members, other.Members) &&
            Equals(Channels, other.Channels) && Equals(Presences, other.Presences) &&
            MaxPresences == other.MaxPresences && MaxMembers == other.MaxMembers &&
            VanityUrlCode == other.VanityUrlCode && Description == other.Description &&
            Banner == other.Banner && PremiumTier == other.PremiumTier &&
            PremiumSubscriptionCount == other.PremiumSubscriptionCount &&
            PrefferedLocale == other.PrefferedLocale &&
            Nullable.Equals(PublicUpdatesChannelId, other.PublicUpdatesChannelId));
 }
Beispiel #6
0
        /// <summary>
        /// Returns true if EquipmentViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of EquipmentViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EquipmentViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     EquipmentType == other.EquipmentType ||
                     EquipmentType != null &&
                     EquipmentType.Equals(other.EquipmentType)
                 ) &&
                 (
                     OwnerName == other.OwnerName ||
                     OwnerName != null &&
                     OwnerName.Equals(other.OwnerName)
                 ) &&
                 (
                     OwnerId == other.OwnerId ||
                     OwnerId != null &&
                     OwnerId.Equals(other.OwnerId)
                 ) &&
                 (
                     IsHired == other.IsHired ||
                     IsHired.Equals(other.IsHired)
                 ) &&
                 (
                     SeniorityString == other.SeniorityString ||
                     SeniorityString != null &&
                     SeniorityString.Equals(other.SeniorityString)
                 ) &&
                 (
                     Make == other.Make ||
                     Make != null &&
                     Make.Equals(other.Make)
                 ) &&
                 (
                     Model == other.Model ||
                     Model != null &&
                     Model.Equals(other.Model)
                 ) &&
                 (
                     Size == other.Size ||
                     Size != null &&
                     Size.Equals(other.Size)
                 ) &&
                 (
                     EquipmentCode == other.EquipmentCode ||
                     EquipmentCode != null &&
                     EquipmentCode.Equals(other.EquipmentCode)
                 ) &&
                 (
                     AttachmentCount == other.AttachmentCount ||
                     AttachmentCount.Equals(other.AttachmentCount)
                 ) &&
                 (
                     LastVerifiedDate == other.LastVerifiedDate ||
                     LastVerifiedDate != null &&
                     LastVerifiedDate.Equals(other.LastVerifiedDate)
                 ) &&
                 (
                     SenioritySortOrder == other.SenioritySortOrder ||
                     SenioritySortOrder.Equals(other.SenioritySortOrder)
                 ));
        }
Beispiel #7
0
        /// <summary>
        /// Returns true if SeniorityViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of SeniorityViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SeniorityViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     EquipmentType == other.EquipmentType ||
                     EquipmentType != null &&
                     EquipmentType.Equals(other.EquipmentType)
                 ) &&
                 (
                     OwnerName == other.OwnerName ||
                     OwnerName != null &&
                     OwnerName.Equals(other.OwnerName)
                 ) &&
                 (
                     OwnerId == other.OwnerId ||
                     OwnerId != null &&
                     OwnerId.Equals(other.OwnerId)
                 ) &&
                 (
                     SeniorityString == other.SeniorityString ||
                     SeniorityString != null &&
                     SeniorityString.Equals(other.SeniorityString)
                 ) &&
                 (
                     Seniority == other.Seniority ||
                     Seniority != null &&
                     Seniority.Equals(other.Seniority)
                 ) &&
                 (
                     Make == other.Make ||
                     Make != null &&
                     Make.Equals(other.Make)
                 ) &&
                 (
                     Model == other.Model ||
                     Model != null &&
                     Model.Equals(other.Model)
                 ) &&
                 (
                     Size == other.Size ||
                     Size != null &&
                     Size.Equals(other.Size)
                 ) &&
                 (
                     EquipmentCode == other.EquipmentCode ||
                     EquipmentCode != null &&
                     EquipmentCode.Equals(other.EquipmentCode)
                 ) &&
                 (
                     LastCalled == other.LastCalled ||
                     LastCalled != null &&
                     LastCalled.Equals(other.LastCalled)
                 ) &&
                 (
                     YearsRegistered == other.YearsRegistered ||
                     YearsRegistered != null &&
                     YearsRegistered.Equals(other.YearsRegistered)
                 ) &&
                 (
                     YtdHours == other.YtdHours ||
                     YtdHours != null &&
                     YtdHours.Equals(other.YtdHours)
                 ) &&
                 (
                     HoursYearMinus1 == other.HoursYearMinus1 ||
                     HoursYearMinus1 != null &&
                     HoursYearMinus1.Equals(other.HoursYearMinus1)
                 ) &&
                 (
                     HoursYearMinus2 == other.HoursYearMinus2 ||
                     HoursYearMinus2 != null &&
                     HoursYearMinus2.Equals(other.HoursYearMinus2)
                 ) &&
                 (
                     HoursYearMinus3 == other.HoursYearMinus3 ||
                     HoursYearMinus3 != null &&
                     HoursYearMinus3.Equals(other.HoursYearMinus3)
                 ) &&
                 (
                     SenioritySortOrder == other.SenioritySortOrder ||
                     SenioritySortOrder.Equals(other.SenioritySortOrder)
                 ));
        }