Exemple #1
0
 /// <summary>
 /// Compare this VMID to another, and return true if they are the
 /// same identifier.
 /// </summary>
 public override bool Equals(Object obj)
 {
     if (obj is VMID)
     {
         VMID vmid = (VMID)obj;
         if (!Uid.Equals(vmid.Uid))
         {
             return(false);
         }
         if ((Addr == null) ^ (vmid.Addr == null))
         {
             return(false);
         }
         if (Addr != null)
         {
             if (Addr.Length != vmid.Addr.Length)
             {
                 return(false);
             }
             for (int i = 0; i < Addr.Length; ++i)
             {
                 if (Addr[i] != vmid.Addr[i])
                 {
                     return(false);
                 }
             }
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 public override bool Equals(object obj)
 {
     if (obj is IPokemon)
     {
         return(UID.Equals((obj as IPokemon).UID));
     }
     return(false);
 }
Exemple #3
0
        public override bool Equals(object obj)
        {
            if (obj is Unique.IPokemon)
            {
                UID.Equals((obj as Unique.IPokemon).UID);
            }

            return(false);
        }
        /// <summary>
        /// Checks the equality of the icon based on the hWnd and uID;
        /// </summary>
        /// <param name="other">The other NotifyIcon to compare to.</param>
        /// <returns>Indication of equality.</returns>
        public bool Equals(NotifyIcon other)
        {
            if (other == null)
            {
                return(false);
            }

            return((HWnd.Equals(other.HWnd) && UID.Equals(other.UID)) || (other.GUID != Guid.Empty && GUID.Equals(other.GUID)));
        }
 /// <summary>
 /// Compares two activation ids for content equality.
 /// Returns true if both of the following conditions are true:
 /// 1) the unique identifiers equivalent (by content), and
 /// 2) the activator specified in each identifier
 ///    refers to the same remote object.
 /// </summary>
 /// <param name="obj">     the Object to compare with </param>
 /// <returns>  true if these Objects are equal; false otherwise. </returns>
 /// <seealso cref=             java.util.Hashtable
 /// @since 1.2 </seealso>
 public override bool Equals(Object obj)
 {
     if (obj is ActivationID)
     {
         ActivationID id = (ActivationID)obj;
         return(Uid.Equals(id.Uid) && Activator.Equals(id.Activator));
     }
     else
     {
         return(false);
     }
 }
Exemple #6
0
 //////// METHODS
 public override bool Equals(Object obj)
 {
     //Check for null and compare run-time types.
     if ((obj == null) || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         People p = (People)obj;
         return(UID.Equals(p.UID));
     }
 }
        // This method returns list of courses registed by student.

        public List <clsCourseScheme> getStudentCourseRegistration()
        {
            List <clsCourseScheme> CourseList = new List <clsCourseScheme>();

            try
            {
                DataTable ds = new DataTable();

                using (SqlConnection conn = ConnectionDB.OpenConnection())
                {
                    SqlCommand sqlComm = new SqlCommand("Proc_GetStudentCourseRegistration", conn);
                    if (StudentCourseRegID > 0)
                    {
                        sqlComm.Parameters.AddWithValue("@StudentCourseRegID", StudentCourseRegID);
                    }

                    if (!UID.Equals("ALL"))
                    {
                        sqlComm.Parameters.AddWithValue("@UID", UID);
                    }

                    sqlComm.CommandType = CommandType.StoredProcedure;

                    SqlDataAdapter da = new SqlDataAdapter();
                    da.SelectCommand = sqlComm;

                    da.Fill(ds);
                }

                foreach (DataRow dr in ds.Rows)
                {
                    CourseList.Add(new clsCourseScheme
                    {
                        CourseID    = int.Parse(dr["courseid"].ToString()),
                        ProgramName = dr["programname"].ToString(),
                        CourseCode  = dr["CourseCode"].ToString(),
                        CourseTitle = dr["CourseTitle"].ToString(),
                        CourseType  = dr["Coursetype"].ToString(),
                    });
                }
            }
            catch (Exception er)
            {
                CourseList.Add(new clsCourseScheme {
                    ErrorMessage = er.Message.ToString()
                });
            }


            return(CourseList);
        }
Exemple #8
0
        public bool Equals(Template other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(UID.Equals(other.UID));
        }
        /// <summary>
        /// Returns true if ThingDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ThingDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ThingDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                     ) &&
                 (
                     BridgeUID == input.BridgeUID ||
                     (BridgeUID != null &&
                      BridgeUID.Equals(input.BridgeUID))
                 ) &&
                 (
                     Configuration == input.Configuration ||
                     Configuration != null &&
                     Configuration.SequenceEqual(input.Configuration)
                 ) &&
                 (
                     Properties == input.Properties ||
                     Properties != null &&
                     Properties.SequenceEqual(input.Properties)
                 ) &&
                 (
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                 ) &&
                 (
                     ThingTypeUID == input.ThingTypeUID ||
                     (ThingTypeUID != null &&
                      ThingTypeUID.Equals(input.ThingTypeUID))
                 ) &&
                 (
                     Channels == input.Channels ||
                     Channels != null &&
                     Channels.SequenceEqual(input.Channels)
                 ) &&
                 (
                     Location == input.Location ||
                     (Location != null &&
                      Location.Equals(input.Location))
                 ));
        }
 public override bool Equals(object obj)
 {
     if (obj is DicomTransferSyntax)
     {
         return(((DicomTransferSyntax)obj).UID.Equals(UID));
     }
     if (obj is DicomUID)
     {
         return(((DicomUID)obj).Equals(UID));
     }
     if (obj is String)
     {
         return(UID.Equals((String)obj));
     }
     return(false);
 }
Exemple #11
0
 /// <summary>
 /// Compares two group identifiers for content equality.
 /// Returns true if both of the following conditions are true:
 /// 1) the unique identifiers are equivalent (by content), and
 /// 2) the activation system specified in each
 ///    refers to the same remote object.
 /// </summary>
 /// <param name="obj">     the Object to compare with </param>
 /// <returns>  true if these Objects are equal; false otherwise. </returns>
 /// <seealso cref=             java.util.Hashtable
 /// @since 1.2 </seealso>
 public override bool Equals(Object obj)
 {
     if (this == obj)
     {
         return(true);
     }
     else if (obj is ActivationGroupID)
     {
         ActivationGroupID id = (ActivationGroupID)obj;
         return(Uid.Equals(id.Uid) && System_Renamed.Equals(id.System_Renamed));
     }
     else
     {
         return(false);
     }
 }
Exemple #12
0
 public override bool Equals(object obj)
 {
     if (obj is RecurringComponent &&
         obj != this)
     {
         RecurringComponent r = (RecurringComponent)obj;
         if (UID != null)
         {
             return(UID.Equals(r.UID));
         }
         else
         {
             return(UID == r.UID);
         }
     }
     return(base.Equals(obj));
 }
        /// <summary>
        /// Returns true if StrippedThingTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of StrippedThingTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StrippedThingTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     Listed == input.Listed ||
                     (Listed != null &&
                      Listed.Equals(input.Listed))
                 ) &&
                 (
                     SupportedBridgeTypeUIDs == input.SupportedBridgeTypeUIDs ||
                     SupportedBridgeTypeUIDs != null &&
                     SupportedBridgeTypeUIDs.SequenceEqual(input.SupportedBridgeTypeUIDs)
                 ) &&
                 (
                     Bridge == input.Bridge ||
                     (Bridge != null &&
                      Bridge.Equals(input.Bridge))
                 ));
        }
Exemple #14
0
        public bool CheckSearch(User user)
        {
            if (null == user)
            {
                throw new ArgumentNullException("user", "The user cannot be NULL in a search.");
            }

            bool result = true;

            result &= true == IsNameSet?Name.Equals(user.Name) : true;

            result &= true == IsUIDSet?UID.Equals(user.UID) : true;

            result &= true == IsGIDSet?GID.Equals(user.GID) : true;

            result &= true == IsCommentSet?Comment.Equals(user.Comment) : true;

            result &= true == IsHomeSet?Home.Equals(user.Home) : true;

            result &= true == IsShellSet?Shell.Equals(user.Shell) : true;

            return(result);
        }
Exemple #15
0
 /// <summary>
 /// Checks the equality of the icon based on the hWnd and uID;
 /// </summary>
 /// <param name="other">The other NotifyIcon to compare to.</param>
 /// <returns>Indication of equality.</returns>
 public bool Equals(NotifyIcon other)
 {
     return(HWnd.Equals(other.HWnd) && UID.Equals(other.UID));
 }
Exemple #16
0
 public virtual bool Equals(TitleObject other)
 {
     return(!ReferenceEquals(other, null) && UID.Equals(other.UID));
 }
 public virtual bool Equals(PvPProfileHistoryEntry other)
 {
     return(!ReferenceEquals(other, null) && UID.Equals(other.UID));
 }
Exemple #18
0
 public bool Equals(Entry other)
 {
     return(!ReferenceEquals(null, other) && (ReferenceEquals(this, other) || UID.Equals(other.UID)));
 }
Exemple #19
0
        /// <summary>
        /// Returns true if EnrichedThingDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of EnrichedThingDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EnrichedThingDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                     ) &&
                 (
                     BridgeUID == input.BridgeUID ||
                     (BridgeUID != null &&
                      BridgeUID.Equals(input.BridgeUID))
                 ) &&
                 (
                     Configuration == input.Configuration ||
                     Configuration != null &&
                     Configuration.SequenceEqual(input.Configuration)
                 ) &&
                 (
                     Properties == input.Properties ||
                     Properties != null &&
                     Properties.SequenceEqual(input.Properties)
                 ) &&
                 (
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                 ) &&
                 (
                     ThingTypeUID == input.ThingTypeUID ||
                     (ThingTypeUID != null &&
                      ThingTypeUID.Equals(input.ThingTypeUID))
                 ) &&
                 (
                     Channels == input.Channels ||
                     Channels != null &&
                     Channels.SequenceEqual(input.Channels)
                 ) &&
                 (
                     Location == input.Location ||
                     (Location != null &&
                      Location.Equals(input.Location))
                 ) &&
                 (
                     StatusInfo == input.StatusInfo ||
                     (StatusInfo != null &&
                      StatusInfo.Equals(input.StatusInfo))
                 ) &&
                 (
                     FirmwareStatus == input.FirmwareStatus ||
                     (FirmwareStatus != null &&
                      FirmwareStatus.Equals(input.FirmwareStatus))
                 ) &&
                 (
                     Editable == input.Editable ||
                     (Editable != null &&
                      Editable.Equals(input.Editable))
                 ));
        }
Exemple #20
0
 public virtual bool Equals(Conquest other)
 {
     return(!ReferenceEquals(other, null) && UID.Equals(other.UID));
 }
Exemple #21
0
 public bool Equals(SafeNotifyIconData other)
 {
     return((HWnd.Equals(other.hWnd) && UID.Equals(other.uID)) || (other.guidItem != Guid.Empty && GUID.Equals(other.guidItem)));
 }
Exemple #22
0
        /// <summary>
        /// Returns true if ThingTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ThingTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ThingTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     Listed == input.Listed ||
                     (Listed != null &&
                      Listed.Equals(input.Listed))
                 ) &&
                 (
                     SupportedBridgeTypeUIDs == input.SupportedBridgeTypeUIDs ||
                     SupportedBridgeTypeUIDs != null &&
                     SupportedBridgeTypeUIDs.SequenceEqual(input.SupportedBridgeTypeUIDs)
                 ) &&
                 (
                     Bridge == input.Bridge ||
                     (Bridge != null &&
                      Bridge.Equals(input.Bridge))
                 ) &&
                 (
                     Channels == input.Channels ||
                     Channels != null &&
                     Channels.SequenceEqual(input.Channels)
                 ) &&
                 (
                     ChannelGroups == input.ChannelGroups ||
                     ChannelGroups != null &&
                     ChannelGroups.SequenceEqual(input.ChannelGroups)
                 ) &&
                 (
                     ConfigParameters == input.ConfigParameters ||
                     ConfigParameters != null &&
                     ConfigParameters.SequenceEqual(input.ConfigParameters)
                 ) &&
                 (
                     ParameterGroups == input.ParameterGroups ||
                     ParameterGroups != null &&
                     ParameterGroups.SequenceEqual(input.ParameterGroups)
                 ) &&
                 (
                     Properties == input.Properties ||
                     Properties != null &&
                     Properties.SequenceEqual(input.Properties)
                 ) &&
                 (
                     ExtensibleChannelTypeIds == input.ExtensibleChannelTypeIds ||
                     ExtensibleChannelTypeIds != null &&
                     ExtensibleChannelTypeIds.SequenceEqual(input.ExtensibleChannelTypeIds)
                 ));
        }
Exemple #23
0
        public bool Equals(IAccount other)
        {
            if (!AccountID.Equals(other.AccountID))
            {
                Error.AddMessage("Account " + UID + " AccountID: " + AccountID + " is not equal to other: " + other.AccountID);
                return(false);
            }

            if (!BirthCountry.Equals(other.BirthCountry))
            {
                Error.AddMessage("Account " + UID + " BirthCountry: " + BirthCountry + " is not equal to other: " + other.BirthCountry);
                return(false);
            }

            if (!Birthday.Equals(other.Birthday))
            {
                Error.AddMessage("Account " + UID + " Birthday: " + Birthday + " is not equal to other: " + other.Birthday);
                return(false);
            }

            if (!BirthPlace.Equals(other.BirthPlace))
            {
                Error.AddMessage("Account " + UID + " BirthPlace: " + BirthPlace + " is not equal to other: " + other.BirthPlace);
                return(false);
            }

            if (!City.Equals(other.City))
            {
                Error.AddMessage("Account " + UID + " City: " + City + " is not equal to other: " + other.City);
                return(false);
            }

            if (!Country.Equals(other.Country))
            {
                Error.AddMessage("Account " + UID + " Country: " + Country + " is not equal to other: " + other.Country);
                return(false);
            }

            if (!ExtraNames.Equals(other.ExtraNames))
            {
                Error.AddMessage("Account " + UID + " ExtraNames: " + ExtraNames + " is not equal to other: " + other.ExtraNames);
                return(false);
            }

            if (!Fax.Equals(other.Fax))
            {
                Error.AddMessage("Account " + UID + " Fax: " + Fax + " is not equal to other: " + other.Fax);
                return(false);
            }

            if (!Gender.Equals(other.Gender))
            {
                Error.AddMessage("Account " + UID + " Gender: " + Gender + " is not equal to other: " + other.Gender);
                return(false);
            }

            if (!GivenName.Equals(other.GivenName))
            {
                Error.AddMessage("Account " + UID + " GivenName: " + GivenName + " is not equal to other: " + other.GivenName);
                return(false);
            }

            if (!Group.Equals(other.Group))
            {
                Error.AddMessage("Account " + UID + " Group: " + Group + " is not equal to other: " + other.Group);
                return(false);
            }

            if (!HomePhone.Equals(other.HomePhone))
            {
                Error.AddMessage("Account " + UID + " HomePhone: " + HomePhone + " is not equal to other: " + other.HomePhone);
                return(false);
            }

            if (!HouseNumber.Equals(other.HouseNumber))
            {
                Error.AddMessage("Account " + UID + " HouseNumber: " + HouseNumber + " is not equal to other: " + other.HouseNumber);
                return(false);
            }

            if (!HouseNumberAdd.Equals(other.HouseNumberAdd))
            {
                Error.AddMessage("Account " + UID + " HouseNumberAdd: " + HouseNumberAdd + " is not equal to other: " + other.HouseNumberAdd);
                return(false);
            }

            if (!Initials.Equals(other.Initials))
            {
                Error.AddMessage("Account " + UID + " Initials: " + Initials + " is not equal to other: " + other.Initials);
                return(false);
            }

            if (!Mail.Equals(other.Mail))
            {
                Error.AddMessage("Account " + UID + " Mail: " + Mail + " is not equal to other: " + other.Mail);
                return(false);
            }

            if (!MailAlias.Equals(other.MailAlias))
            {
                Error.AddMessage("Account " + UID + " MailAlias: " + MailAlias + " is not equal to other: " + other.MailAlias);
                return(false);
            }

            if (!MobilePhone.Equals(other.MobilePhone))
            {
                Error.AddMessage("Account " + UID + " MobilePhone: " + MobilePhone + " is not equal to other: " + other.MobilePhone);
                return(false);
            }

            if (!PostalCode.Equals(other.PostalCode))
            {
                Error.AddMessage("Account " + UID + " PostalCode: " + PostalCode + " is not equal to other: " + other.PostalCode);
                return(false);
            }

            if (!RegisterID.Equals(other.RegisterID))
            {
                Error.AddMessage("Account " + UID + " RegisterID: " + RegisterID + " is not equal to other: " + other.RegisterID);
                return(false);
            }

            if (!Role.Equals(other.Role))
            {
                Error.AddMessage("Account " + UID + " Role: " + Role + " is not equal to other: " + other.Role);
                return(false);
            }

            if (!StemID.Equals(other.StemID))
            {
                Error.AddMessage("Account " + UID + " StemID: " + StemID + " is not equal to other: " + other.StemID);
                return(false);
            }

            if (!Street.Equals(other.Street))
            {
                Error.AddMessage("Account " + UID + " Street: " + Street + " is not equal to other: " + other.Street);
                return(false);
            }

            if (!SurName.Equals(other.SurName))
            {
                Error.AddMessage("Account " + UID + " SurName: " + SurName + " is not equal to other: " + other.SurName);
                return(false);
            }

            if (!UID.Equals(other.UID))
            {
                Error.AddMessage("Account " + UID + " UID: " + UID + " is not equal to other: " + other.UID);
                return(false);
            }

            if (!UntisID.Equals(other.UntisID))
            {
                Error.AddMessage("Account " + UID + " UntisID: " + UntisID + " is not equal to other: " + other.UntisID);
                return(false);
            }

            return(true);
        }
Exemple #24
0
 public bool Equals(ConquestState other)
 {
     return(!ReferenceEquals(other, null) && UID.Equals(other.UID));
 }
Exemple #25
0
		public bool Equals(DonationProfile other)
		{
			return !ReferenceEquals(other, null) && (ReferenceEquals(other, this) || UID.Equals(other.UID));
		}
        /// <summary>
        /// Returns true if ChannelTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ChannelTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ChannelTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Parameters == input.Parameters ||
                     Parameters != null &&
                     Parameters.SequenceEqual(input.Parameters)
                     ) &&
                 (
                     ParameterGroups == input.ParameterGroups ||
                     ParameterGroups != null &&
                     ParameterGroups.SequenceEqual(input.ParameterGroups)
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     ItemType == input.ItemType ||
                     (ItemType != null &&
                      ItemType.Equals(input.ItemType))
                 ) &&
                 (
                     Kind == input.Kind ||
                     (Kind != null &&
                      Kind.Equals(input.Kind))
                 ) &&
                 (
                     StateDescription == input.StateDescription ||
                     (StateDescription != null &&
                      StateDescription.Equals(input.StateDescription))
                 ) &&
                 (
                     Tags == input.Tags ||
                     Tags != null &&
                     Tags.SequenceEqual(input.Tags)
                 ) &&
                 (
                     UID == input.UID ||
                     (UID != null &&
                      UID.Equals(input.UID))
                 ) &&
                 (
                     Advanced == input.Advanced ||
                     (Advanced != null &&
                      Advanced.Equals(input.Advanced))
                 ) &&
                 (
                     CommandDescription == input.CommandDescription ||
                     (CommandDescription != null &&
                      CommandDescription.Equals(input.CommandDescription))
                 ));
        }