/// <summary>/// Create a new task pushing provider authentication data records onto the OICP server./// </summary>/// <param name="ProviderAuthenticationDataRecords">An enumeration of provider authentication data records.</param>/// <param name="OICPAction">An optional OICP action.</param>/// <param name="QueryTimeout">An optional timeout for this query.</param>publicasyncTask<HTTPResponse<eRoamingAcknowledgement>>PushAuthenticationData(IEnumerable<ProviderAuthenticationData>ProviderAuthenticationDataRecords,ActionTypeOICPAction=ActionType.fullLoad,TimeSpan?QueryTimeout=null){ [...]}/// <summary>/// Create a new task pushing authorization identifications onto the OICP server./// </summary>/// <param name="AuthorizationIdentifications">An enumeration of authorization identifications.</param>/// <param name="ProviderId">The unique identification of the EVSP.</param>/// <param name="OICPAction">An optional OICP action.</param>/// <param name="QueryTimeout">An optional timeout for this query.</param>publicasyncTask<HTTPResponse<eRoamingAcknowledgement>>PushAuthenticationData(IEnumerable<AuthorizationIdentification>AuthorizationIdentifications,EVSP_IdProviderId,ActionTypeOICPAction=ActionType.fullLoad,TimeSpan?QueryTimeout=null){ [...]}
Task.Factory.StartNew(async()=>{varresult=awaitnewEMPClient("api.playground.hubject.com").PushAuthenticationData(Enumeration.Create(AuthorizationIdentification.FromAuthToken(Auth_Token.Parse("08152305")),AuthorizationIdentification.FromQRCodeIdentification(eMA_Id.Parse("DE-GDF-C123ABC56-X"),"1234")),EVSP_Id.Parse("DE*GDF"),OICPAction:ActionType.fullLoad,QueryTimeout:TimeSpan.FromSeconds(120));if(result.Content.Result)Console.WriteLine("success!");else{ConsoleX.WriteLines("PushAuthenticationData result:",result.Content.StatusCode.Code,result.Content.StatusCode.Description,result.Content.StatusCode.AdditionalInfo);}}).// Wait for the task to complete...Wait();
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.