/// <summary> /// Create a new generic eMIP request message. /// </summary> /// <param name="PartnerId">The partner identification.</param> /// <param name="TransactionId">An optional eMIP transaction identification.</param> /// /// <param name="HTTPRequest">The correlated HTTP request of this eMIP request.</param> /// <param name="Timestamp">The optional timestamp of the request.</param> /// <param name="CancellationToken">An optional token to cancel this request.</param> /// <param name="EventTrackingId">An optional event tracking identification for correlating this request with other events.</param> /// <param name="RequestTimeout">An optional timeout for this request.</param> public ARequest(HTTPRequest HTTPRequest, Partner_Id PartnerId, Transaction_Id?TransactionId = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) { this.HTTPRequest = HTTPRequest; this.PartnerId = PartnerId; this.TransactionId = TransactionId; this.Timestamp = Timestamp ?? DateTime.UtcNow; this.CancellationTokenSource = CancellationToken == null ? new CancellationTokenSource() : null; this.CancellationToken = CancellationToken ?? CancellationTokenSource.Token; this.EventTrackingId = EventTrackingId ?? EventTracking_Id.New; this.RequestTimeout = RequestTimeout ?? DefaultRequestTimeout; }
CreateeMIPv0_7_4_CSORoamingProvider(this RoamingNetwork RoamingNetwork, EMPRoamingProvider_Id Id, I18NString Name, I18NString Description, CPORoaming CPORoaming, eMIPv0_7_4.Partner_Id PartnerId, ChargingStationOperator DefaultOperator, WWCPChargeDetailRecord2ChargeDetailRecordDelegate WWCPChargeDetailRecord2eMIPChargeDetailRecord = null, IncludeEVSEIdDelegate IncludeEVSEIds = null, IncludeEVSEDelegate IncludeEVSEs = null, IncludeChargingStationIdDelegate IncludeChargingStationIds = null, IncludeChargingStationDelegate IncludeChargingStations = null, IncludeChargingPoolIdDelegate IncludeChargingPoolIds = null, IncludeChargingPoolDelegate IncludeChargingPools = null, ChargeDetailRecordFilterDelegate ChargeDetailRecordFilter = null, CustomOperatorIdMapperDelegate CustomOperatorIdMapper = null, CustomEVSEIdMapperDelegate CustomEVSEIdMapper = null, TimeSpan?SendHeartbeatsEvery = null, TimeSpan?ServiceCheckEvery = null, TimeSpan?StatusCheckEvery = null, TimeSpan?CDRCheckEvery = null, Boolean DisableSendHeartbeats = false, Boolean DisablePushData = false, Boolean DisablePushStatus = false, Boolean DisableAuthentication = false, Boolean DisableSendChargeDetailRecords = false, Action <eMIPv0_7_4.CPO.WWCPCPOAdapter> eMIPConfigurator = null, Action <IEMPRoamingProvider> Configurator = null, String EllipticCurve = "P-256", ECPrivateKeyParameters PrivateKey = null, PublicKeyCertificates PublicKeyCertificates = null, CounterValues?CPOClientSendHeartbeatCounter = null, CounterValues?CPOClientSetChargingPoolAvailabilityStatusCounter = null, CounterValues?CPOClientSetChargingStationAvailabilityStatusCounter = null, CounterValues?CPOClientSetEVSEAvailabilityStatusCounter = null, CounterValues?CPOClientSetChargingConnectorAvailabilityStatusCounter = null, CounterValues?CPOClientSetEVSEBusyStatusCounter = null, CounterValues?CPOClientSetEVSESyntheticStatusCounter = null, CounterValues?CPOClientGetServiceAuthorisationCounter = null, CounterValues?CPOClientSetSessionEventReportCounter = null, CounterValues?CPOClientSetChargeDetailRecordCounter = null) { #region Initial checks if (RoamingNetwork == null) { throw new ArgumentNullException(nameof(RoamingNetwork), "The given roaming network must not be null!"); } if (Id == null) { throw new ArgumentNullException(nameof(Id), "The given unique roaming provider identification must not be null!"); } if (Name.IsNullOrEmpty()) { throw new ArgumentNullException(nameof(Name), "The given roaming provider name must not be null or empty!"); } if (CPORoaming is null) { throw new ArgumentNullException(nameof(CPORoaming), "The given CPO roaming must not be null!"); } #endregion var NewRoamingProvider = new WWCPCPOAdapter(Id, Name, Description, RoamingNetwork, CPORoaming, PartnerId, DefaultOperator, IncludeEVSEIds, IncludeEVSEs, IncludeChargingStationIds, IncludeChargingStations, IncludeChargingPoolIds, IncludeChargingPools, ChargeDetailRecordFilter, CustomOperatorIdMapper, CustomEVSEIdMapper, //EVSE2EVSEDataRecord, //EVSEStatusUpdate2EVSEStatusRecord, WWCPChargeDetailRecord2eMIPChargeDetailRecord, SendHeartbeatsEvery, ServiceCheckEvery, StatusCheckEvery, CDRCheckEvery, DisableSendHeartbeats, DisablePushData, DisablePushStatus, DisableAuthentication, DisableSendChargeDetailRecords, EllipticCurve, PrivateKey, PublicKeyCertificates); eMIPConfigurator?.Invoke(NewRoamingProvider); return(RoamingNetwork. CreateNewRoamingProvider(NewRoamingProvider, Configurator) as WWCPCPOAdapter); }
public static eMobilityProvider_Id ToWWCP_ProviderId(this Partner_Id PartnerId) => eMobilityProvider_Id.Parse(PartnerId.ToString());