コード例 #1
0
        public MainPage()
        {
            this.InitializeComponent();
#pragma warning disable 4014
            IoTClient.Start(this);
#pragma warning restore 4014
        }
コード例 #2
0
        public MainPage()
        {
            this.InitializeComponent();

            var defaultProtocol = TransportType.Mqtt;

            this.client = new IoTClient(defaultProtocol, CallMeLogger, GetDeviceNameLogger, ErrorHandler);

            protocolLookup.ForEach(_ =>
            {
                this.protocolComboBox.Items.Add(_.Name);
            });

            this.protocolComboBox.SelectedIndex = protocolLookup.IndexOf(new ProtocolNameToIdLookupEntry {
                Id = defaultProtocol, Name = GetProtocolNameFromId(defaultProtocol)
            });

#pragma warning disable 4014
            client.Start();
#pragma warning restore 4014
        }