Refactor code

This commit is contained in:
Christian Kratky
2017-09-19 23:05:41 +02:00
parent 651f0aa15c
commit 305578e7e6
4 changed files with 9 additions and 18 deletions
@@ -27,7 +27,7 @@ namespace MQTTnet.Implementations
{
var response = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, currentOffset, count), cancellationToken).ConfigureAwait(false);
currentOffset += response.Count;
if (response.MessageType == WebSocketMessageType.Close)
{
await _webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, cancellationToken).ConfigureAwait(false);
@@ -56,15 +56,12 @@ namespace MQTTnet.Implementations
public override bool CanSeek => false;
public override bool CanWrite => true;
public override long Length
{
get { throw new NotSupportedException(); }
}
public override long Length => throw new NotSupportedException();
public override long Position
{
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
get => throw new NotSupportedException();
set => throw new NotSupportedException();
}
public override long Seek(long offset, SeekOrigin origin)