Beispiel #1
0
        public async Task <IPlatformResponse <string> > Simulate(IMachineRequest request, CancellationToken?cancellationToken = null, IProgress <ISDKProgress> progress = null)
        {
            var tokenP = IssueNewTokenAndProgressContainer(cancellationToken, progress);

            if ((await Login(Authorization, cancellationToken, progress)).Success)
            {
                var json = _serializer.SerializeToString(request);
                return(await _clientBuilder.Request <string>(ApiEndpoint.Api, "v2/simulator", tokenP.CancellationToken, tokenP.Progress, HttpMethod.Post, json));
            }
            _log.Fatal(new Exception("Authorization Failed"));
            return(await Task.FromResult <IPlatformResponse <string> >(null));
        }
 public async Task <IPlatformResponse <string> > Simulate(IMachineRequest request, CancellationToken?cancellationToken = null, IProgress <ISDKProgress> progress = null)
 {
     SetupTokenAndProgress(cancellationToken, progress);
     return(await SdkClient.Simulate(request, cancellationToken, progress));
 }