Commit cc9cc376 authored by alan.f's avatar alan.f

clean-codes

parent 5b13d712
...@@ -25,7 +25,6 @@ namespace C_UI ...@@ -25,7 +25,6 @@ namespace C_UI
{ {
var client = new DicomClient(inputsDto.ServerHost, inputsDto.Port, false, inputsDto.ServerAET, inputsDto.Aet); var client = new DicomClient(inputsDto.ServerHost, inputsDto.Port, false, inputsDto.ServerAET, inputsDto.Aet);
client.NegotiateAsyncOps(); client.NegotiateAsyncOps();
inputsDto.FileNames.ToObservable() inputsDto.FileNames.ToObservable()
.Select(async fileName => .Select(async fileName =>
{ {
...@@ -34,13 +33,16 @@ namespace C_UI ...@@ -34,13 +33,16 @@ namespace C_UI
await client.AddRequestAsync(request); await client.AddRequestAsync(request);
await client.SendAsync(); await client.SendAsync();
}) })
.Select(t => t.Exception.Flatten()) .Select(
.Subscribe(filename => t => t.Exception.Flatten()
logger.Warn($"file sent:{filename}"), )
onError => .Subscribe(
logger.Error(onError.Message), filename =>
() => { }); 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