public Task Close() { var source = new TaskCompletionSource <bool>(); var callback = MposClosedCallback.Callback(this, source); var error = Native.Close(nativeMpos, "", callback); if (error != Native.Error.Ok) { throw new MposException(error); } return(source.Task); }
public Task Close() { var source = new TaskCompletionSource <bool>(); var callback = MposClosedCallback.Callback(this, source); PgDebugLog.WriteLocal("Start Close"); var error = Native.Close(nativeMpos, "", callback); PgDebugLog.WriteLocal($"Called Close: result code [{error}]"); if (error != Error.Ok) { throw new MposException(error); } return(source.Task); }