예제 #1
0
        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);
        }
예제 #2
0
        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));
        }