public void DeviceClient_AuthMethod_NoGatewayHostnameTest()
        {
            string hostName   = "acme.azure-devices.net";
            var    authMethod = new DeviceAuthenticationWithSakRefresh("device1", null);

            var deviceClient = DeviceClient.Create(hostName, authMethod);
        }
        public void DeviceClient_AuthMethod_TransportType_NoGatewayHostnameTest()
        {
            string hostName   = "acme.azure-devices.net";
            var    authMethod = new DeviceAuthenticationWithSakRefresh("device1", null);

            var deviceClient = DeviceClient.Create(hostName, authMethod, TransportType.Amqp_WebSocket_Only);
        }
コード例 #3
0
        public void DeviceClient_AuthMethod_TransportType_TransparentGatewayHostnameTest()
        {
            string gatewayHostname = "myGatewayDevice";
            var    authMethod      = new DeviceAuthenticationWithSakRefresh("device1", null);

            var deviceClient = DeviceClient.Create(gatewayHostname, authMethod, TransportType.Amqp_WebSocket_Only);
        }
        public void DeviceClient_AuthMethod_TransportSettings_GatewayHostnameTest()
        {
            string hostName        = "acme.azure-devices.net";
            string gatewayHostname = "gateway.acme.azure-devices.net";
            var    authMethod      = new DeviceAuthenticationWithSakRefresh("device1", null);

            var deviceClient = DeviceClient.Create(hostName, gatewayHostname, authMethod, new ITransportSettings[]
            {
                new AmqpTransportSettings(TransportType.Amqp_WebSocket_Only)
            });
        }