コード例 #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingProfileId1">An charging profile identification.</param>
        /// <param name="ChargingProfileId2">Another charging profile identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ChargingProfile_Id ChargingProfileId1, ChargingProfile_Id ChargingProfileId2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(ChargingProfileId1, ChargingProfileId2))
            {
                return(true);
            }

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

            if ((Object)ChargingProfileId1 == null)
            {
                throw new ArgumentNullException(nameof(ChargingProfileId1), "The given charging profile identification must not be null!");
            }

            return(ChargingProfileId1.Equals(ChargingProfileId2));
        }
コード例 #2
0
ファイル: ChargingProfile_Id.cs プロジェクト: xrjob/WWCP_OCPP
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingProfileId1">A charging profile identification.</param>
        /// <param name="ChargingProfileId2">Another charging profile identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ChargingProfile_Id ChargingProfileId1,
                                          ChargingProfile_Id ChargingProfileId2)

        => ChargingProfileId1.Equals(ChargingProfileId2);