示例#1
0
 /// <summary>
 /// Create a new remote start result.
 /// </summary>
 /// <param name="Result">The result of the remote start operation.</param>
 /// <param name="Message">An optional message.</param>
 private RemoteStartEVSEResult(RemoteStartEVSEResultType Result,
                               String Message = null)
 {
     this._Result  = Result;
     this._Session = null;
     this._Message = Message;
 }
示例#2
0
        /// <summary>
        /// Compares two charging sessions for equality.
        /// </summary>
        /// <param name="ChargingSession">A charging session to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingSession ChargingSession)
        {
            if ((Object)ChargingSession == null)
            {
                return(false);
            }

            return(Id.Equals(ChargingSession.Id));
        }
示例#3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingSession">A charging session object to compare with.</param>
        public Int32 CompareTo(ChargingSession ChargingSession)
        {
            if ((Object)ChargingSession == null)
            {
                throw new ArgumentNullException("The given charging session must not be null!");
            }

            return(Id.CompareTo(ChargingSession.Id));
        }
示例#4
0
        /// <summary>
        /// Compares two charging sessions for equality.
        /// </summary>
        /// <param name="ChargingSession">A charging session to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingSession ChargingSession)
        {

            if ((Object) ChargingSession == null)
                return false;

            return Id.Equals(ChargingSession.Id);

        }
        /// <summary>
        /// The remote start was successful.
        /// </summary>
        /// <param name="Session">The charging session.</param>
        public static RemoteStartChargingStationResult Success(ChargingSession Session)
        {
            #region Initial checks

            if (Session == null)
            {
                throw new ArgumentNullException(nameof(Session), "The given charging session must not be null!");
            }

            #endregion

            return(new RemoteStartChargingStationResult(Session));
        }
示例#6
0
        /// <summary>
        /// Create a new successful remote start result.
        /// </summary>
        /// <param name="Session">The charging session.</param>
        private RemoteStartEVSEResult(ChargingSession Session)
        {
            #region Initial checks

            if (Session == null)
            {
                throw new ArgumentNullException(nameof(Session), "The given charging session must not be null!");
            }

            #endregion

            this._Result  = RemoteStartEVSEResultType.Success;
            this._Session = Session;
            this._Message = null;
        }
示例#7
0
        public static JProperty ToJSON(this ChargingSession ChargingSession, String JPropertyKey)
        {

            #region Initial checks

            if (ChargingSession == null)
                throw new ArgumentNullException(nameof(ChargingSession),  "The given charging session must not be null!");

            if (JPropertyKey.IsNullOrEmpty())
                throw new ArgumentNullException(nameof(JPropertyKey),     "The given json property key must not be null or empty!");

            #endregion

            return new JProperty(JPropertyKey,
                                 ChargingSession.ToJSON());

        }
 /// <summary>
 /// Create a new remote start result.
 /// </summary>
 /// <param name="Result">The result of the remote start operation.</param>
 private RemoteStartChargingStationResult(RemoteStartChargingStationResultType Result)
 {
     this._Result  = Result;
     this._Session = null;
     this._Message = null;
 }
 /// <summary>
 /// Create a new successful remote start result.
 /// </summary>
 /// <param name="Session">The charging session (mandatory for successful session starts).</param>
 private RemoteStartChargingStationResult(ChargingSession Session)
 {
     this._Result  = RemoteStartChargingStationResultType.Success;
     this._Session = Session;
     this._Message = null;
 }
示例#10
0
        /// <summary>
        /// The remote start was successful and a charging session
        /// will be embedded within the response.
        /// </summary>
        /// <param name="Session">The charging session.</param>
        public static RemoteStartResult Success(ChargingSession Session)

        => new RemoteStartResult(Session);