/// <summary> /// Create a new acknowledgement. /// </summary> /// <param name="Result">The result of the operation.</param> /// <param name="Description">An optional description of the result code.</param> /// <param name="Warnings">Warnings or additional information.</param> /// <param name="Runtime">The runtime of the request.</param> private PushChargingStationDataResult(IId Id, IReceiveData IReceiveData, PushDataResultTypes Result, IEnumerable <PushSingleChargingStationDataResult> RejectedEVSEs = null, String Description = null, IEnumerable <Warning> Warnings = null, TimeSpan?Runtime = null) { this.Id = Id; this.IReceiveData = IReceiveData; this.Result = Result; this.RejectedEVSEs = RejectedEVSEs ?? new PushSingleChargingStationDataResult[0]; this.Description = Description.IsNotNullOrEmpty() ? Description.Trim() : null; this.Warnings = Warnings != null ? Warnings.Where(warning => warning.IsNotNullOrEmpty()) : new Warning[0]; this.Runtime = Runtime; }
/// <summary> /// Create a new PushEVSEData result. /// </summary> /// <param name="AuthId">The unqiue identification of the authenticator.</param> /// <param name="IReceiveData">An object implementing IReceiveData.</param> /// <param name="Result">The result of the operation.</param> /// <param name="Description">An optional description of the result code.</param> /// <param name="RejectedEVSEs">An enumeration of rejected EVSEs.</param> /// <param name="Warnings">Warnings or additional information.</param> /// <param name="Runtime">The runtime of the request.</param> internal PushEVSEDataResult(IId AuthId, IReceiveData IReceiveData, PushDataResultTypes Result, IEnumerable <EVSE> RejectedEVSEs = null, String Description = null, IEnumerable <Warning> Warnings = null, TimeSpan?Runtime = null) : this(AuthId, Result, Description, RejectedEVSEs, Warnings, Runtime) { this.IReceiveData = IReceiveData; }
/// <summary> /// Create a new PushEVSEData 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="RejectedEVSEs">An enumeration of rejected EVSEs.</param> /// <param name="Warnings">Warnings or additional information.</param> /// <param name="Runtime">The runtime of the request.</param> private PushEVSEDataResult(IId AuthId, PushDataResultTypes Result, String Description = null, IEnumerable <EVSE> RejectedEVSEs = null, IEnumerable <Warning> Warnings = null, TimeSpan?Runtime = null) { this.AuthId = AuthId; this.Result = Result; this.Description = Description.IsNotNullOrEmpty() ? Description.Trim() : null; this.RejectedEVSEs = RejectedEVSEs != null ? RejectedEVSEs.Where(evse => evse != null) : new EVSE[0]; this.Warnings = Warnings != null ? Warnings.Where(warning => warning.IsNotNullOrEmpty()) : new Warning[0]; this.Runtime = Runtime; }