コード例 #1
0
        /// <summary>
        /// Create a new PushChargingStationOperatorAdminStatus 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="RejectedChargingStationOperatorAdminStatusUpdates">An enumeration of rejected ChargingStationOperator status updates.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        internal PushChargingStationOperatorAdminStatusResult(IId AuthId,
                                                              IReceiveAdminStatus IReceiveAdminStatus,
                                                              PushChargingStationOperatorAdminStatusResultTypes Result,
                                                              String Description = null,
                                                              IEnumerable <ChargingStationOperatorAdminStatusUpdate> RejectedChargingStationOperatorAdminStatusUpdates = null,
                                                              IEnumerable <Warning> Warnings = null,
                                                              TimeSpan?Runtime = null)

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

        {
            this.IReceiveAdminStatus = IReceiveAdminStatus;
        }
コード例 #2
0
        /// <summary>
        /// Create a new PushChargingStationOperatorAdminStatus 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="RejectedChargingStationOperatorAdminStatusUpdates">An enumeration of rejected ChargingStationOperator status updates.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        private PushChargingStationOperatorAdminStatusResult(IId AuthId,
                                                             PushChargingStationOperatorAdminStatusResultTypes Result,
                                                             String Description = null,
                                                             IEnumerable <ChargingStationOperatorAdminStatusUpdate> RejectedChargingStationOperatorAdminStatusUpdates = null,
                                                             IEnumerable <Warning> Warnings = null,
                                                             TimeSpan?Runtime = null)
        {
            this.AuthId = AuthId;
            this.Result = Result;

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

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

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

            this.Runtime = Runtime;
        }