Ejemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ContractId1">A contract identification.</param>
        /// <param name="ContractId2">Another contract identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Contract_Id ContractId1, Contract_Id ContractId2)
        {
            if ((Object)ContractId1 == null)
            {
                throw new ArgumentNullException(nameof(ContractId1), "The given ContractId1 must not be null!");
            }

            return(ContractId1.CompareTo(ContractId2) > 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ContractId1">A contract identification.</param>
        /// <param name="ContractId2">Another contract identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Contract_Id ContractId1, Contract_Id ContractId2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(ContractId1, ContractId2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)ContractId1 == null) || ((Object)ContractId2 == null))
            {
                return(false);
            }

            return(ContractId1.Equals(ContractId2));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ContractId1">A contract identification.</param>
        /// <param name="ContractId2">Another contract identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Contract_Id ContractId1,
                                         Contract_Id ContractId2)

        => ContractId1.CompareTo(ContractId2) > 0;
Ejemplo n.º 4
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ContractId1">A contract identification.</param>
        /// <param name="ContractId2">Another contract identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Contract_Id ContractId1,
                                          Contract_Id ContractId2)

        => ContractId1.Equals(ContractId2);