|
@@ -0,0 +1,32 @@
|
|
|
+namespace DataSharing.LuZhou.LZ110
|
|
|
+{
|
|
|
+ public class LZ110RegisterManager
|
|
|
+ {
|
|
|
+ private readonly LZ110Invoker _invoker;
|
|
|
+
|
|
|
+ public LZ110RegisterManager(LZ110Invoker invoker)
|
|
|
+ {
|
|
|
+ _invoker = invoker;
|
|
|
+ }
|
|
|
+
|
|
|
+ private async Task<LZ110ApiResponse<LZ110BaseResponse>> RegisterAsync(CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ return await _invoker.InvokeAsync<LZ110RegisterRequest, LZ110BaseResponse>(
|
|
|
+ new(), cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Task UnRegisterAsync(CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ return _invoker.InvokeAsync<LZ110UnRegisterRequest, LZ110BaseResponse>(
|
|
|
+ new(), cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Task RefreshRegisterAsync(CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ return Task.WhenAll(
|
|
|
+ UnRegisterAsync(cancellationToken),
|
|
|
+ RegisterAsync(cancellationToken)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|