public MqttPacketAwaitable(ushort packetIdentifier, MqttPacketDispatcher owningPacketDispatcher) { Filter = new MqttPacketAwaitableFilter { Type = typeof(TPacket), Identifier = packetIdentifier }; _owningPacketDispatcher = owningPacketDispatcher ?? throw new ArgumentNullException(nameof(owningPacketDispatcher)); }
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 }
public MqttPacketAwaiter(ushort?packetIdentifier, MqttPacketDispatcher owningPacketDispatcher) { _packetIdentifier = packetIdentifier; _owningPacketDispatcher = owningPacketDispatcher ?? throw new ArgumentNullException(nameof(owningPacketDispatcher)); }