Example #1
0
        /// <summary>
        /// Create a new PushChargingPoolAdminStatus result.
        /// </summary>
        /// <param name="AuthId">The unqiue identification of the authenticator.</param>
        /// <param name="IReceiveAdminStatus">An object implementing IReceiveAdminStatus.</param>
        /// <param name="Result">The result of the operation.</param>
        /// <param name="Description">An optional description of the result code.</param>
        /// <param name="RejectedChargingPoolAdminStatusUpdates">An enumeration of rejected ChargingPool status updates.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        internal PushChargingPoolAdminStatusResult(IId AuthId,
                                                   IReceiveAdminStatus IReceiveAdminStatus,
                                                   PushChargingPoolAdminStatusResultTypes Result,
                                                   String Description = null,
                                                   IEnumerable <ChargingPoolAdminStatusUpdate> RejectedChargingPoolAdminStatusUpdates = null,
                                                   IEnumerable <Warning> Warnings = null,
                                                   TimeSpan?Runtime = null)

            : this(AuthId,
                   Result,
                   Description,
                   RejectedChargingPoolAdminStatusUpdates,
                   Warnings,
                   Runtime)

        {
            this.IReceiveAdminStatus = IReceiveAdminStatus;
        }
Example #2
0
        /// <summary>
        /// Create a new PushChargingPoolAdminStatus result.
        /// </summary>
        /// <param name="AuthId">The unqiue identification of the authenticator.</param>
        /// <param name="Result">The result of the operation.</param>
        /// <param name="Description">An optional description of the result code.</param>
        /// <param name="RejectedChargingPoolAdminStatusUpdates">An enumeration of rejected ChargingPool status updates.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        private PushChargingPoolAdminStatusResult(IId AuthId,
                                                  PushChargingPoolAdminStatusResultTypes Result,
                                                  String Description = null,
                                                  IEnumerable <ChargingPoolAdminStatusUpdate> RejectedChargingPoolAdminStatusUpdates = null,
                                                  IEnumerable <Warning> Warnings = null,
                                                  TimeSpan?Runtime = null)
        {
            this.AuthId = AuthId;
            this.Result = Result;

            this.Description = Description.IsNotNullOrEmpty()
                                                       ? Description.Trim()
                                                       : null;

            this.RejectedChargingPoolAdminStatusUpdates = RejectedChargingPoolAdminStatusUpdates != null
                                                       ? RejectedChargingPoolAdminStatusUpdates.Where(evse => evse != null)
                                                       : new ChargingPoolAdminStatusUpdate[0];

            this.Warnings = Warnings != null
                                                       ? Warnings.Where(warning => warning.IsNotNullOrEmpty())
                                                       : new Warning[0];

            this.Runtime = Runtime;
        }