示例#1
0
        /// <summary>
        /// Compares two operator EVSE datas for equality.
        /// </summary>
        /// <param name="OperatorEVSEData">A operator EVSE data to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(OperatorEVSEData OperatorEVSEData)
        {
            if ((Object)OperatorEVSEData == null)
            {
                return(false);
            }

            return(OperatorId.Equals(OperatorEVSEData.OperatorId) &&

                   ((OperatorName == null && OperatorEVSEData.OperatorName == null) ||
                    (OperatorName != null && OperatorEVSEData.OperatorName != null && OperatorName.Equals(OperatorEVSEData.OperatorName))) &&

                   ((!EVSEDataRecords.Any() && !OperatorEVSEData.EVSEDataRecords.Any()) ||
                    (EVSEDataRecords.Any() && OperatorEVSEData.EVSEDataRecords.Any() && EVSEDataRecords.Count().Equals(OperatorEVSEData.EVSEDataRecords.Count()))));
        }
示例#2
0
        /// <summary>
        /// Return a text-representation of this object.
        /// </summary>
        public override String ToString()

        => String.Concat(OperatorId,
                         OperatorName.IsNotNullOrEmpty() ? ", " + OperatorName : "",
                         ", ", EVSEDataRecords.Count(), " EVSE data record(s)");
        /// <summary>
        /// Return a text-representation of this object.
        /// </summary>
        public override String ToString()

        => String.Concat(Action, " of ",
                         EVSEDataRecords.Count(), " EVSE data record(s)",
                         " (", OperatorId, OperatorName != null ? " / " + OperatorName : "", ")");