public async Task SetMethodHandlerAsync(string methodName, MethodCallback methodHandler, object userContext) { if (client == null) { await mockClient.SetMethodHandlerAsync(methodName, methodHandler, userContext); } else { await client.SetMethodHandlerAsync(methodName, methodHandler, userContext); } }
public async Task SetCommandHandlerAsync(string commandName, MethodCallback callback, object ctx) { await deviceClient.SetMethodHandlerAsync($"{commandName}", callback, ctx); }