mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 05:00:39 +02:00
Visual Studio Reformat: SocketHttpListener
This commit is contained in:
parent
9014e16037
commit
8fd0bc63b9
|
@ -51,8 +51,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// A <see cref="ushort"/> that represents the status code for the close if any.
|
||||
/// </value>
|
||||
public ushort Code {
|
||||
get {
|
||||
public ushort Code
|
||||
{
|
||||
get
|
||||
{
|
||||
return _code;
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +65,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// A <see cref="string"/> that represents the reason for the close if any.
|
||||
/// </value>
|
||||
public string Reason {
|
||||
get {
|
||||
public string Reason
|
||||
{
|
||||
get
|
||||
{
|
||||
return _reason;
|
||||
}
|
||||
}
|
||||
|
@ -75,12 +79,15 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// <c>true</c> if the WebSocket connection has been closed cleanly; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool WasClean {
|
||||
get {
|
||||
public bool WasClean
|
||||
{
|
||||
get
|
||||
{
|
||||
return _clean;
|
||||
}
|
||||
|
||||
internal set {
|
||||
internal set
|
||||
{
|
||||
_clean = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// A <see cref="string"/> that represents the error message.
|
||||
/// </value>
|
||||
public string Message {
|
||||
get {
|
||||
public string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
return _message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
|
@ -441,7 +440,8 @@ namespace SocketHttpListener
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
buffer.Append(c);
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Model.Services;
|
||||
|
||||
namespace SocketHttpListener
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
|
||||
using HttpVersion = SocketHttpListener.Net.HttpVersion;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Services;
|
||||
using SocketHttpListener.Net;
|
||||
using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
|
||||
using HttpVersion = SocketHttpListener.Net.HttpVersion;
|
||||
|
||||
namespace SocketHttpListener
|
||||
{
|
||||
|
|
|
@ -48,8 +48,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// A <see cref="string"/> that contains the received data.
|
||||
/// </value>
|
||||
public string Data {
|
||||
get {
|
||||
public string Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
}
|
||||
|
@ -60,8 +62,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// An array of <see cref="byte"/> that contains the received data.
|
||||
/// </value>
|
||||
public byte [] RawData {
|
||||
get {
|
||||
public byte[] RawData
|
||||
{
|
||||
get
|
||||
{
|
||||
return _rawData;
|
||||
}
|
||||
}
|
||||
|
@ -72,8 +76,10 @@ namespace SocketHttpListener
|
|||
/// <value>
|
||||
/// One of the <see cref="Opcode"/> values, indicates the type of the received data.
|
||||
/// </value>
|
||||
public Opcode Type {
|
||||
get {
|
||||
public Opcode Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return _opcode;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal class AuthenticationTypes
|
||||
{
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal enum BoundaryType
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using SocketHttpListener.Primitives;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal enum EntitySendFormat
|
||||
{
|
||||
|
|
|
@ -3,19 +3,17 @@ using System.IO;
|
|||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Text;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SocketHttpListener.Primitives;
|
||||
using System.Security.Authentication;
|
||||
|
||||
using System.Threading;
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
sealed class HttpConnection
|
||||
|
|
|
@ -1,21 +1,15 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Primitives;
|
||||
using ProtocolType = MediaBrowser.Model.Net.ProtocolType;
|
||||
using SocketType = MediaBrowser.Model.Net.SocketType;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -3,12 +3,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using SocketHttpListener.Primitives;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal static partial class HttpKnownHeaderNames
|
||||
{
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Primitives;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System.ComponentModel;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Net.WebSockets;
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Security.Principal;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Net.WebSockets;
|
||||
using System.Threading.Tasks;
|
||||
using SocketHttpListener.Net.WebSockets;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Security.Authentication.ExtendedProtection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Services;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Primitives;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Services;
|
||||
using SocketHttpListener.Net.WebSockets;
|
||||
using SocketHttpListener.Primitives;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
using SocketHttpListener.Primitives;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal static class HttpStatusDescription
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using MediaBrowser.Model.Net;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
internal static class UriScheme
|
||||
{
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Services;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net
|
||||
{
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Security.Principal;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
using SocketHttpListener.Primitives;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
{
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
{
|
||||
public enum WebSocketCloseStatus
|
||||
{
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Net;
|
||||
using System.Security.Principal;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Net;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using WebSocketState = System.Net.WebSockets.WebSocketState;
|
||||
|
||||
namespace SocketHttpListener.Net.WebSockets
|
||||
|
|
|
@ -54,8 +54,10 @@ namespace SocketHttpListener
|
|||
|
||||
#region Internal Properties
|
||||
|
||||
internal bool ContainsReservedCloseStatusCode {
|
||||
get {
|
||||
internal bool ContainsReservedCloseStatusCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _applicationData.Length > 1 &&
|
||||
_applicationData.SubArray(0, 2).ToUInt16(ByteOrder.Big).IsReserved();
|
||||
}
|
||||
|
@ -65,26 +67,34 @@ namespace SocketHttpListener
|
|||
|
||||
#region Public Properties
|
||||
|
||||
public byte [] ApplicationData {
|
||||
get {
|
||||
public byte[] ApplicationData
|
||||
{
|
||||
get
|
||||
{
|
||||
return _applicationData;
|
||||
}
|
||||
}
|
||||
|
||||
public byte [] ExtensionData {
|
||||
get {
|
||||
public byte[] ExtensionData
|
||||
{
|
||||
get
|
||||
{
|
||||
return _extensionData;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMasked {
|
||||
get {
|
||||
public bool IsMasked
|
||||
{
|
||||
get
|
||||
{
|
||||
return _masked;
|
||||
}
|
||||
}
|
||||
|
||||
public ulong Length {
|
||||
get {
|
||||
public ulong Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ulong)(_extensionData.Length + _applicationData.Length);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace SocketHttpListener.Primitives
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketHttpListener
|
||||
{
|
||||
|
|
|
@ -3,15 +3,12 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
using MediaBrowser.Model.IO;
|
||||
using SocketHttpListener.Net.WebSockets;
|
||||
using SocketHttpListener.Primitives;
|
||||
using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
|
||||
using System.Net.Sockets;
|
||||
using WebSocketState = System.Net.WebSockets.WebSocketState;
|
||||
|
||||
namespace SocketHttpListener
|
||||
|
|
|
@ -51,7 +51,8 @@ namespace SocketHttpListener
|
|||
/// One of the <see cref="CloseStatusCode"/> enum values, represents the status code indicating
|
||||
/// the cause for the exception.
|
||||
/// </value>
|
||||
public CloseStatusCode Code {
|
||||
public CloseStatusCode Code
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace SocketHttpListener
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue