Commit 86a03328 authored by alan.f's avatar alan.f

update-code-for-async

parent 9ed82e73
......@@ -33,19 +33,17 @@ namespace C_UI
request.OnResponseReceived += (req, response) => logger.Info($"{response.Status}-{fileName}");
await client.AddRequestAsync(request);
await client.SendAsync();
return fileName;
})
.Select(t =>
.Select(t => t.Wait(1))
.Subscribe(filename =>
{
return t.Result;
}).Subscribe();
//.Subscribe(filename =>
//{
// logger.Warn($"file sent:{filename}");
//},
//onError =>
//{ logger.Error(onError.Message); },
//() => { });
logger.Warn($"file sent:{filename}");
},
onError =>
{
logger.Error(onError.Message);
},
() => { });
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment