Exemplo n.º 1
0
        public MqttPacketAwaitable(ushort packetIdentifier, MqttPacketDispatcher owningPacketDispatcher)
        {
            Filter = new MqttPacketAwaitableFilter
            {
                Type       = typeof(TPacket),
                Identifier = packetIdentifier
            };

            _owningPacketDispatcher = owningPacketDispatcher ?? throw new ArgumentNullException(nameof(owningPacketDispatcher));
        }
Exemplo n.º 2
0
        public MqttPacketAwaiter(ushort?packetIdentifier, MqttPacketDispatcher owningPacketDispatcher)
        {
            _packetIdentifier       = packetIdentifier;
            _owningPacketDispatcher = owningPacketDispatcher ?? throw new ArgumentNullException(nameof(owningPacketDispatcher));
#if NET452
            _taskCompletionSource = new TaskCompletionSource <MqttBasePacket>();
#else
            _taskCompletionSource = new TaskCompletionSource <MqttBasePacket>(TaskCreationOptions.RunContinuationsAsynchronously);
#endif
        }
Exemplo n.º 3
0
 public MqttPacketAwaiter(ushort?packetIdentifier, MqttPacketDispatcher owningPacketDispatcher)
 {
     _packetIdentifier       = packetIdentifier;
     _owningPacketDispatcher = owningPacketDispatcher ?? throw new ArgumentNullException(nameof(owningPacketDispatcher));
 }