Пример #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ProviderId1">An e-mobility provider identification.</param>
        /// <param name="ProviderId2">Another e-mobility provider identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(NavigationProvider_Id ProviderId1, NavigationProvider_Id ProviderId2)
        {
            if ((Object)ProviderId1 == null)
            {
                throw new ArgumentNullException(nameof(ProviderId1), "The given ProviderId1 must not be null!");
            }

            return(ProviderId1.CompareTo(ProviderId2) > 0);
        }
Пример #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ProviderId1">An e-mobility provider identification.</param>
        /// <param name="ProviderId2">Another e-mobility provider identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(NavigationProvider_Id ProviderId1, NavigationProvider_Id ProviderId2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(ProviderId1, ProviderId2))
            {
                return(true);
            }

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

            return(ProviderId1.Equals(ProviderId2));
        }
Пример #3
0
 /// <summary>
 /// Compares two instances of this object.
 /// </summary>
 /// <param name="ProviderId1">An e-mobility provider identification.</param>
 /// <param name="ProviderId2">Another e-mobility provider identification.</param>
 /// <returns>true|false</returns>
 public static Boolean operator >=(Provider_Id ProviderId1, Provider_Id ProviderId2)
 => ProviderId1.CompareTo(ProviderId2) >= 0;
Пример #4
0
 /// <summary>
 /// Compares two instances of this object.
 /// </summary>
 /// <param name="ProviderId1">An e-mobility provider identification.</param>
 /// <param name="ProviderId2">Another e-mobility provider identification.</param>
 /// <returns>true|false</returns>
 public static Boolean operator !=(Provider_Id ProviderId1, Provider_Id ProviderId2)
 => !ProviderId1.Equals(ProviderId2);