AuthorizeRemoteReservationStart(this IEMPClient EMPClient, Provider_Id ProviderId, EVSE_Id EVSEId, Identification Identification, Session_Id?SessionId = null, CPOPartnerSession_Id?CPOPartnerSessionId = null, EMPPartnerSession_Id?EMPPartnerSessionId = null, PartnerProduct_Id?PartnerProductId = null, TimeSpan?Duration = null, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.AuthorizeRemoteReservationStart( new AuthorizeRemoteReservationStartRequest( ProviderId, EVSEId, Identification, SessionId, CPOPartnerSessionId, EMPPartnerSessionId, PartnerProductId, Duration, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
SetSessionAction(this IEMPClient EMPClient, Partner_Id PartnerId, Operator_Id OperatorId, ServiceSession_Id ServiceSessionId, SessionAction SessionAction, Transaction_Id?TransactionId = null, PartnerServiceSession_Id?SalePartnerSessionId = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.SetSessionAction(new SetSessionActionRequest(PartnerId, OperatorId, ServiceSessionId, SessionAction, TransactionId, SalePartnerSessionId, HTTPRequest, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
AuthorizeRemoteStop(this IEMPClient EMPClient, Provider_Id ProviderId, EVSE_Id EVSEId, Session_Id SessionId, CPOPartnerSession_Id?CPOPartnerSessionId = null, EMPPartnerSession_Id?EMPPartnerSessionId = null, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.AuthorizeRemoteStop( new AuthorizeRemoteStopRequest( ProviderId, EVSEId, SessionId, CPOPartnerSessionId, EMPPartnerSessionId, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
PullEVSEData(this IEMPClient IEMPClient, Provider_Id?ProviderId = null, GeoCoordinate?SearchCenter = null, Single DistanceKM = 0f, DateTime?LastCall = null, GeoCoordinatesResponseFormats?GeoCoordinatesResponseFormat = GeoCoordinatesResponseFormats.DecimalDegree, IEnumerable <Operator_Id> OperatorIdFilter = null, IEnumerable <Country> CountryCodeFilter = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.PullEVSEData(new PullEVSEDataRequest(ProviderId ?? IEMPClient.DefaultProviderId.Value, SearchCenter, DistanceKM, LastCall, GeoCoordinatesResponseFormat, OperatorIdFilter, CountryCodeFilter, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
PullEVSEData(this IEMPClient EMPClient, Provider_Id ProviderId, DateTime?LastCall = null, IEnumerable <Operator_Id> OperatorIdFilter = null, IEnumerable <Country> CountryCodeFilter = null, IEnumerable <AccessibilityTypes> AccessibilityFilter = null, IEnumerable <AuthenticationModes> AuthenticationModeFilter = null, IEnumerable <CalibrationLawDataAvailabilities> CalibrationLawDataAvailabilityFilter = null, Boolean?RenewableEnergyFilter = null, Boolean?IsHubjectCompatibleFilter = null, Boolean?IsOpen24HoursFilter = null, GeoCoordinates?SearchCenter = null, Single?DistanceKM = null, GeoCoordinatesFormats?GeoCoordinatesResponseFormat = GeoCoordinatesFormats.DecimalDegree, UInt32?Page = null, UInt32?Size = null, IEnumerable <String> SortOrder = null, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.PullEVSEData( new PullEVSEDataRequest( ProviderId, LastCall, OperatorIdFilter, CountryCodeFilter, AccessibilityFilter, AuthenticationModeFilter, CalibrationLawDataAvailabilityFilter, RenewableEnergyFilter, IsHubjectCompatibleFilter, IsOpen24HoursFilter, SearchCenter, DistanceKM, GeoCoordinatesResponseFormat, Page, Size, SortOrder, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
PushAuthenticationData(this IEMPClient IEMPClient, ProviderAuthenticationData ProviderAuthenticationData, ActionTypes Action = ActionTypes.fullLoad, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.PushAuthenticationData(new PushAuthenticationDataRequest(ProviderAuthenticationData, Action, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
PullEVSEStatusById(this IEMPClient IEMPClient, IEnumerable <EVSE_Id> EVSEIds, Provider_Id?ProviderId = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.PullEVSEStatusById(new PullEVSEStatusByIdRequest(ProviderId ?? IEMPClient.DefaultProviderId.Value, EVSEIds, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
SetServiceAuthorisation(this IEMPClient EMPClient, Partner_Id PartnerId, Operator_Id OperatorId, EVSE_Id EVSEId, User_Id UserId, Service_Id RequestedServiceId, RemoteStartStopValues AuthorisationValue, Boolean IntermediateCDRRequested, Transaction_Id?TransactionId = null, PartnerServiceSession_Id?PartnerServiceSessionId = null, Contract_Id?UserContractIdAlias = null, IEnumerable <MeterReport> MeterLimits = null, String Parameter = null, Booking_Id?BookingId = null, Booking_Id?SalePartnerBookingId = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.SetServiceAuthorisation(new SetServiceAuthorisationRequest(PartnerId, OperatorId, EVSEId, UserId, RequestedServiceId, AuthorisationValue, IntermediateCDRRequested, TransactionId, PartnerServiceSessionId, UserContractIdAlias, MeterLimits, Parameter, BookingId, SalePartnerBookingId, HTTPRequest, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
GetChargeDetailRecords(this IEMPClient IEMPClient, Provider_Id ProviderId, DateTime From, DateTime To, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.GetChargeDetailRecords(new GetChargeDetailRecordsRequest(ProviderId, From, To, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
PushAuthenticationData(this IEMPClient IEMPClient, IEnumerable <Identification> AuthorizationIdentifications, Provider_Id ProviderId, ActionTypes Action = ActionTypes.fullLoad, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.PushAuthenticationData(new PushAuthenticationDataRequest(new ProviderAuthenticationData(ProviderId, AuthorizationIdentifications), Action, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
PullEVSEStatusByOperatorId(this IEMPClient EMPClient, Provider_Id ProviderId, IEnumerable <Operator_Id> OperatorIds, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.PullEVSEStatusByOperatorId( new PullEVSEStatusByOperatorIdRequest( ProviderId, OperatorIds, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
PullEVSEStatus(this IEMPClient IEMPClient, Provider_Id?ProviderId = null, GeoCoordinate?SearchCenter = null, Single DistanceKM = 0f, EVSEStatusTypes?EVSEStatusFilter = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.PullEVSEStatus(new PullEVSEStatusRequest(ProviderId ?? IEMPClient.DefaultProviderId.Value, SearchCenter, DistanceKM, EVSEStatusFilter, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
SendHeartbeat(this IEMPClient EMPClient, Partner_Id PartnerId, Operator_Id OperatorId, Transaction_Id?TransactionId = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.SendHeartbeat(new HeartbeatRequest(PartnerId, OperatorId, TransactionId, HTTPRequest, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
ReservationStop(this IEMPClient IEMPClient, Session_Id SessionId, Provider_Id ProviderId, EVSE_Id EVSEId, CPOPartnerSession_Id?CPOPartnerSessionId = null, EMPPartnerSession_Id?EMPPartnerSessionId = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => IEMPClient.AuthorizeRemoteReservationStop(new AuthorizeRemoteReservationStopRequest(SessionId, ProviderId, EVSEId, CPOPartnerSessionId, EMPPartnerSessionId, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? IEMPClient.RequestTimeout));
GetChargeDetailRecords(this IEMPClient EMPClient, Provider_Id ProviderId, DateTime From, DateTime To, IEnumerable <Session_Id> SessionIds = null, IEnumerable <Operator_Id> OperatorIds = null, Boolean?CDRForwarded = null, UInt32?Page = null, UInt32?Size = null, IEnumerable <String> SortOrder = null, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.GetChargeDetailRecords( new GetChargeDetailRecordsRequest( ProviderId, From, To, SessionIds, OperatorIds, CDRForwarded, Page, Size, SortOrder, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
PullEVSEStatus(this IEMPClient EMPClient, Provider_Id ProviderId, GeoCoordinates?SearchCenter = null, Single?DistanceKM = null, EVSEStatusTypes?EVSEStatusFilter = null, JObject CustomData = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => EMPClient.PullEVSEStatus( new PullEVSEStatusRequest( ProviderId, SearchCenter, DistanceKM, EVSEStatusFilter, CustomData, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? EMPClient.RequestTimeout));
/// <summary> /// Create a new OICP EMP client logger using the given logging delegates. /// </summary> /// <param name="EMPClient">A OICP EMP client.</param> /// <param name="Context">A context of this API.</param> /// /// <param name="LogHTTPRequest_toConsole">A delegate to log incoming HTTP requests to console.</param> /// <param name="LogHTTPResponse_toConsole">A delegate to log HTTP requests/responses to console.</param> /// <param name="LogHTTPRequest_toDisc">A delegate to log incoming HTTP requests to disc.</param> /// <param name="LogHTTPResponse_toDisc">A delegate to log HTTP requests/responses to disc.</param> /// /// <param name="LogHTTPRequest_toNetwork">A delegate to log incoming HTTP requests to a network target.</param> /// <param name="LogHTTPResponse_toNetwork">A delegate to log HTTP requests/responses to a network target.</param> /// <param name="LogHTTPRequest_toHTTPSSE">A delegate to log incoming HTTP requests to a HTTP client sent events source.</param> /// <param name="LogHTTPResponse_toHTTPSSE">A delegate to log HTTP requests/responses to a HTTP client sent events source.</param> /// /// <param name="LogHTTPError_toConsole">A delegate to log HTTP errors to console.</param> /// <param name="LogHTTPError_toDisc">A delegate to log HTTP errors to disc.</param> /// <param name="LogHTTPError_toNetwork">A delegate to log HTTP errors to a network target.</param> /// <param name="LogHTTPError_toHTTPSSE">A delegate to log HTTP errors to a HTTP client sent events source.</param> /// /// <param name="LogfileCreator">A delegate to create a log file from the given context and log file name.</param> public EMPClientLogger(IEMPClient EMPClient, String Context, HTTPRequestLoggerDelegate LogHTTPRequest_toConsole, HTTPResponseLoggerDelegate LogHTTPResponse_toConsole, HTTPRequestLoggerDelegate LogHTTPRequest_toDisc, HTTPResponseLoggerDelegate LogHTTPResponse_toDisc, HTTPRequestLoggerDelegate LogHTTPRequest_toNetwork = null, HTTPResponseLoggerDelegate LogHTTPResponse_toNetwork = null, HTTPRequestLoggerDelegate LogHTTPRequest_toHTTPSSE = null, HTTPResponseLoggerDelegate LogHTTPResponse_toHTTPSSE = null, HTTPResponseLoggerDelegate LogHTTPError_toConsole = null, HTTPResponseLoggerDelegate LogHTTPError_toDisc = null, HTTPResponseLoggerDelegate LogHTTPError_toNetwork = null, HTTPResponseLoggerDelegate LogHTTPError_toHTTPSSE = null, LogfileCreatorDelegate LogfileCreator = null) : base(EMPClient, Context.IsNotNullOrEmpty() ? Context : DefaultContext, LogHTTPRequest_toConsole, LogHTTPResponse_toConsole, LogHTTPRequest_toDisc, LogHTTPResponse_toDisc, LogHTTPRequest_toNetwork, LogHTTPResponse_toNetwork, LogHTTPRequest_toHTTPSSE, LogHTTPResponse_toHTTPSSE, LogHTTPError_toConsole, LogHTTPError_toDisc, LogHTTPError_toNetwork, LogHTTPError_toHTTPSSE, LogfileCreator) { #region Initial checks this.EMPClient = EMPClient ?? throw new ArgumentNullException(nameof(EMPClient), "The given EMP client must not be null!"); #endregion #region Register log events // PullEVSEData/-Status RegisterEvent("PullEVSEDataRequest", handler => EMPClient.OnPullEVSEDataSOAPRequest += handler, handler => EMPClient.OnPullEVSEDataSOAPRequest -= handler, "PullEVSEData", "EVSE", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PullEVSEDataResponse", handler => EMPClient.OnPullEVSEDataSOAPResponse += handler, handler => EMPClient.OnPullEVSEDataSOAPResponse -= handler, "PullEVSEData", "EVSE", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PullEVSEStatusRequest", handler => EMPClient.OnPullEVSEStatusSOAPRequest += handler, handler => EMPClient.OnPullEVSEStatusSOAPRequest -= handler, "PullEVSEStatus", "EVSE", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PullEVSEStatusResponse", handler => EMPClient.OnPullEVSEStatusSOAPResponse += handler, handler => EMPClient.OnPullEVSEStatusSOAPResponse -= handler, "PullEVSEStatus", "EVSE", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PullEVSEStatusByIdRequest", handler => EMPClient.OnPullEVSEStatusByIdSOAPRequest += handler, handler => EMPClient.OnPullEVSEStatusByIdSOAPRequest -= handler, "PullEVSEStatusById", "EVSE", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PullEVSEStatusByIdResponse", handler => EMPClient.OnPullEVSEStatusByIdSOAPResponse += handler, handler => EMPClient.OnPullEVSEStatusByIdSOAPResponse -= handler, "PullEVSEStatusById", "EVSE", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); // PushAuthenticationData RegisterEvent("PushAuthenticationDataRequest", handler => EMPClient.OnPushAuthenticationDataSOAPRequest += handler, handler => EMPClient.OnPushAuthenticationDataSOAPRequest -= handler, "PushAuthenticationData", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("PushAuthenticationDataResponse", handler => EMPClient.OnPushAuthenticationDataSOAPResponse += handler, handler => EMPClient.OnPushAuthenticationDataSOAPResponse -= handler, "PushAuthenticationData", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); // ReservationStart/-Stop RegisterEvent("ReservationStartRequest", handler => EMPClient.OnAuthorizeRemoteReservationStartSOAPRequest += handler, handler => EMPClient.OnAuthorizeRemoteReservationStartSOAPRequest -= handler, "ReservationStart", "Reservation", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("ReservationStartResponse", handler => EMPClient.OnAuthorizeRemoteReservationStartSOAPResponse += handler, handler => EMPClient.OnAuthorizeRemoteReservationStartSOAPResponse -= handler, "ReservationStart", "Reservation", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("ReservationStopRequest", handler => EMPClient.OnAuthorizeRemoteReservationStopSOAPRequest += handler, handler => EMPClient.OnAuthorizeRemoteReservationStopSOAPRequest -= handler, "ReservationStop", "Reservation", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("ReservationStopResponse", handler => EMPClient.OnAuthorizeRemoteReservationStopSOAPResponse += handler, handler => EMPClient.OnAuthorizeRemoteReservationStopSOAPResponse -= handler, "ReservationStop", "Reservation", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); // AuthorizeRemoteStart/-Stop RegisterEvent("AuthorizeRemoteStartRequest", handler => EMPClient.OnAuthorizeRemoteStartSOAPRequest += handler, handler => EMPClient.OnAuthorizeRemoteStartSOAPRequest -= handler, "AuthorizeRemoteStart", "AuthorizeRemote", "Authorize", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("AuthorizeRemoteStartResponse", handler => EMPClient.OnAuthorizeRemoteStartSOAPResponse += handler, handler => EMPClient.OnAuthorizeRemoteStartSOAPResponse -= handler, "AuthorizeRemoteStart", "AuthorizeRemote", "Authorize", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("AuthorizeRemoteStopRequest", handler => EMPClient.OnAuthorizeRemoteStopSOAPRequest += handler, handler => EMPClient.OnAuthorizeRemoteStopSOAPRequest -= handler, "AuthorizeRemoteStop", "AuthorizeRemote", "Authorize", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("AuthorizeRemoteStopResponse", handler => EMPClient.OnAuthorizeRemoteStopSOAPResponse += handler, handler => EMPClient.OnAuthorizeRemoteStopSOAPResponse -= handler, "AuthorizeRemoteStop", "AuthorizeRemote", "Authorize", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); // GetChargeDetailRecords RegisterEvent("GetChargeDetailRecordsRequest", handler => EMPClient.OnGetChargeDetailRecordsSOAPRequest += handler, handler => EMPClient.OnGetChargeDetailRecordsSOAPRequest -= handler, "GetChargeDetailRecords", "ChargeDetailRecords", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("GetChargeDetailRecordsResponse", handler => EMPClient.OnGetChargeDetailRecordsSOAPResponse += handler, handler => EMPClient.OnGetChargeDetailRecordsSOAPResponse -= handler, "GetChargeDetailRecords", "ChargeDetailRecords", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); #endregion }
/// <summary> /// Create a new eMIP EMP client logger using the given logging delegates. /// </summary> /// <param name="EMPClient">A eMIP EMP client.</param> /// <param name="LoggingPath">The logging path.</param> /// <param name="Context">A context of this API.</param> /// /// <param name="LogHTTPRequest_toConsole">A delegate to log incoming HTTP requests to console.</param> /// <param name="LogHTTPResponse_toConsole">A delegate to log HTTP requests/responses to console.</param> /// <param name="LogHTTPRequest_toDisc">A delegate to log incoming HTTP requests to disc.</param> /// <param name="LogHTTPResponse_toDisc">A delegate to log HTTP requests/responses to disc.</param> /// /// <param name="LogHTTPRequest_toNetwork">A delegate to log incoming HTTP requests to a network target.</param> /// <param name="LogHTTPResponse_toNetwork">A delegate to log HTTP requests/responses to a network target.</param> /// <param name="LogHTTPRequest_toHTTPSSE">A delegate to log incoming HTTP requests to a HTTP client sent events source.</param> /// <param name="LogHTTPResponse_toHTTPSSE">A delegate to log HTTP requests/responses to a HTTP client sent events source.</param> /// /// <param name="LogHTTPError_toConsole">A delegate to log HTTP errors to console.</param> /// <param name="LogHTTPError_toDisc">A delegate to log HTTP errors to disc.</param> /// <param name="LogHTTPError_toNetwork">A delegate to log HTTP errors to a network target.</param> /// <param name="LogHTTPError_toHTTPSSE">A delegate to log HTTP errors to a HTTP client sent events source.</param> /// /// <param name="LogfileCreator">A delegate to create a log file from the given context and log file name.</param> public Logger(IEMPClient EMPClient, String LoggingPath, String Context, HTTPRequestLoggerDelegate LogHTTPRequest_toConsole, HTTPResponseLoggerDelegate LogHTTPResponse_toConsole, HTTPRequestLoggerDelegate LogHTTPRequest_toDisc, HTTPResponseLoggerDelegate LogHTTPResponse_toDisc, HTTPRequestLoggerDelegate LogHTTPRequest_toNetwork = null, HTTPResponseLoggerDelegate LogHTTPResponse_toNetwork = null, HTTPRequestLoggerDelegate LogHTTPRequest_toHTTPSSE = null, HTTPResponseLoggerDelegate LogHTTPResponse_toHTTPSSE = null, HTTPResponseLoggerDelegate LogHTTPError_toConsole = null, HTTPResponseLoggerDelegate LogHTTPError_toDisc = null, HTTPResponseLoggerDelegate LogHTTPError_toNetwork = null, HTTPResponseLoggerDelegate LogHTTPError_toHTTPSSE = null, LogfileCreatorDelegate LogfileCreator = null) : base(EMPClient, LoggingPath, Context.IsNotNullOrEmpty() ? Context : DefaultContext, LogHTTPRequest_toConsole, LogHTTPResponse_toConsole, LogHTTPRequest_toDisc, LogHTTPResponse_toDisc, LogHTTPRequest_toNetwork, LogHTTPResponse_toNetwork, LogHTTPRequest_toHTTPSSE, LogHTTPResponse_toHTTPSSE, LogHTTPError_toConsole, LogHTTPError_toDisc, LogHTTPError_toNetwork, LogHTTPError_toHTTPSSE, LogfileCreator) { #region Initial checks this.EMPClient = EMPClient ?? throw new ArgumentNullException(nameof(EMPClient), "The given EMP client must not be null!"); #endregion #region Register log events RegisterEvent("SendHeartbeatRequest", handler => EMPClient.OnSendHeartbeatSOAPRequest += handler, handler => EMPClient.OnSendHeartbeatSOAPRequest -= handler, "SendHeartbeat", "Heartbeat", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("SendHeartbeatResponse", handler => EMPClient.OnSendHeartbeatSOAPResponse += handler, handler => EMPClient.OnSendHeartbeatSOAPResponse -= handler, "SendHeartbeat", "Heartbeat", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("SetServiceAuthorisationRequest", handler => EMPClient.OnSetServiceAuthorisationSOAPRequest += handler, handler => EMPClient.OnSetServiceAuthorisationSOAPRequest -= handler, "SetServiceAuthorisation", "ServiceAuthorisation", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("SetServiceAuthorisationResponse", handler => EMPClient.OnSetServiceAuthorisationSOAPResponse += handler, handler => EMPClient.OnSetServiceAuthorisationSOAPResponse -= handler, "SetServiceAuthorisation", "ServiceAuthorisation", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("SetSessionActionRequest", handler => EMPClient.OnSetSessionActionSOAPRequest += handler, handler => EMPClient.OnSetSessionActionSOAPRequest -= handler, "SetSessionAction", "SessionAction", "Request", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); RegisterEvent("SetSessionActionResponse", handler => EMPClient.OnSetSessionActionSOAPResponse += handler, handler => EMPClient.OnSetSessionActionSOAPResponse -= handler, "SetSessionAction", "SessionAction", "Response", "All"). RegisterDefaultConsoleLogTarget(this). RegisterDefaultDiscLogTarget(this); #endregion }