async Task <TestModule> GetModule(RegistryManager rm, string hostName, string deviceId, string moduleId, bool isReceiver, ITransportSettings[] transportSettings) { string connStr = await RegistryManagerHelper.GetOrCreateModule(rm, hostName, deviceId, moduleId); TestModule module = await TestModule.CreateAndConnect(connStr, transportSettings); if (isReceiver) { await module.SetupReceiveMessageHandler(); } return(module); }
public static async Task <TestModule> CreateAndConnect(RegistryManager rm, string hostName, string deviceId, string moduleId, ITransportSettings[] transportSettings) { string connStr = await RegistryManagerHelper.GetOrCreateModule(rm, hostName, deviceId, moduleId); return(await CreateAndConnect(connStr, transportSettings)); }