diff --git a/Common/ASCIIEncoding.cs b/Common/ASCIIEncoding.cs index cda2309..72af10e 100644 --- a/Common/ASCIIEncoding.cs +++ b/Common/ASCIIEncoding.cs @@ -1,7 +1,6 @@ using System; -using System.Net; -using System.Text; using System.Collections.Generic; +using System.Text; namespace SuperSocket.ClientEngine { @@ -13,7 +12,6 @@ namespace SuperSocket.ClientEngine /// public class ASCIIEncoding : Encoding { - static ASCIIEncoding() { m_Instance = new ASCIIEncoding(); @@ -80,7 +78,6 @@ public char? FallbackCharacter /// public byte? FallbackByte { get; private set; } - public ASCIIEncoding() { FallbackCharacter = '?'; @@ -92,11 +89,11 @@ public ASCIIEncoding() /// /// The actual number of bytes written into . /// - /// The character array containing the set of characters to encode. - /// The index of the first character to encode. - /// The number of characters to encode. + /// The character array containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. /// The byte array to contain the resulting sequence of bytes. - /// The index at which to start writing the resulting sequence of bytes. + /// The index at which to start writing the resulting sequence of bytes. /// public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { @@ -105,7 +102,6 @@ public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] : GetBytesWithoutFallback(chars, charIndex, charCount, bytes, byteIndex); } - private int GetBytesWithFallBack(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { for (int i = 0; i < charCount; i++) @@ -143,19 +139,17 @@ private int GetBytesWithoutFallback(char[] chars, int charIndex, int charCount, return charCount; } - - /// /// Decodes a sequence of bytes from the specified byte array into the specified character array. /// /// /// The actual number of characters written into . /// - /// The byte array containing the sequence of bytes to decode. - /// The index of the first byte to decode. - /// The number of bytes to decode. - /// The character array to contain the resulting set of characters. - /// The index at which to start writing the resulting set of characters. + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The character array to contain the resulting set of characters. + /// The index at which to start writing the resulting set of characters. /// public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { @@ -164,7 +158,6 @@ public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] : GetCharsWithoutFallback(bytes, byteIndex, byteCount, chars, charIndex); } - private int GetCharsWithFallback(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { for (int i = 0; i < byteCount; i++) @@ -182,8 +175,6 @@ private int GetCharsWithFallback(byte[] bytes, int byteIndex, int byteCount, cha return byteCount; } - - private int GetCharsWithoutFallback(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { for (int i = 0; i < byteCount; i++) @@ -197,15 +188,12 @@ private int GetCharsWithoutFallback(byte[] bytes, int byteIndex, int byteCount, throw new EncoderFallbackException(msg); } - chars[charIndex + i] = byteToChar[lookupIndex]; } return byteCount; } - - /// /// Calculates the number of bytes produced by encoding a set of characters /// from the specified character array. @@ -219,21 +207,19 @@ public override int GetByteCount(char[] chars, int index, int count) return count; } - /// /// Calculates the number of characters produced by decoding a sequence /// of bytes from the specified byte array. /// /// /// The number of characters produced by decoding the specified sequence of bytes. This class - /// alwas returns the value of . + /// alwas returns the value of . /// public override int GetCharCount(byte[] bytes, int index, int count) { return count; } - /// /// Calculates the maximum number of bytes produced by encoding the specified number of characters. /// @@ -241,7 +227,7 @@ public override int GetCharCount(byte[] bytes, int index, int count) /// The maximum number of bytes produced by encoding the specified number of characters. This /// class alwas returns the value of . /// - /// The number of characters to encode. + /// The number of characters to encode. /// public override int GetMaxByteCount(int charCount) { @@ -255,13 +241,12 @@ public override int GetMaxByteCount(int charCount) /// The maximum number of characters produced by decoding the specified number of bytes. This class /// alwas returns the value of . /// - /// The number of bytes to decode. + /// The number of bytes to decode. public override int GetMaxCharCount(int byteCount) { return byteCount; } - /// /// Gets the number of characters that are supported by this encoding. /// This property returns a maximum value of 256, as the encoding class @@ -272,7 +257,6 @@ public static int CharacterCount get { return byteToChar.Length; } } - #region Character Table /// @@ -410,11 +394,10 @@ public static int CharacterCount (char)124 /* byte 124 */ , (char)125 /* byte 125 */ , (char)126 /* byte 126 */ , - (char)127 /* byte 127 */ + (char)127 /* byte 127 */ }; - #endregion - + #endregion Character Table #region Byte Lookup Dictionary @@ -553,6 +536,6 @@ public static int CharacterCount { (char)127, 127 } }; - #endregion + #endregion Byte Lookup Dictionary } -} +} \ No newline at end of file diff --git a/Common/ConcurrentBatchQueue.Net20.cs b/Common/ConcurrentBatchQueue.Net20.cs index e8ed678..046dbf0 100644 --- a/Common/ConcurrentBatchQueue.Net20.cs +++ b/Common/ConcurrentBatchQueue.Net20.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using System.Threading; namespace SuperSocket.ClientEngine @@ -18,7 +17,7 @@ public class ConcurrentBatchQueue : IBatchQueue private Func m_NullValidator; - class Entity + private class Entity { public T[] Array { get; set; } @@ -31,7 +30,6 @@ class Entity public ConcurrentBatchQueue() : this(16) { - } /// @@ -41,7 +39,6 @@ public ConcurrentBatchQueue() public ConcurrentBatchQueue(int capacity) : this(new T[capacity]) { - } /// @@ -52,7 +49,6 @@ public ConcurrentBatchQueue(int capacity) public ConcurrentBatchQueue(int capacity, Func nullValidator) : this(new T[capacity], nullValidator) { - } /// @@ -62,7 +58,6 @@ public ConcurrentBatchQueue(int capacity, Func nullValidator) public ConcurrentBatchQueue(T[] array) : this(array, (t) => t == null) { - } /// @@ -115,7 +110,7 @@ private bool TryEnqueue(T item, out bool full) return false; } - if(entity != m_Entity) + if (entity != m_Entity) return false; int oldCount = Interlocked.CompareExchange(ref entity.Count, count + 1, count); @@ -233,7 +228,6 @@ public bool TryDequeue(IList outputItems) outputItems.Add(array[i]); array[i] = m_Null; - if (entity.Count <= (i + 1)) break; @@ -265,4 +259,4 @@ public int Count get { return (m_Entity as Entity).Count; } } } -} +} \ No newline at end of file diff --git a/Common/ConcurrentBatchQueue.cs b/Common/ConcurrentBatchQueue.cs index 6bb6789..bc32a09 100644 --- a/Common/ConcurrentBatchQueue.cs +++ b/Common/ConcurrentBatchQueue.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using System.Threading; namespace SuperSocket.ClientEngine @@ -18,7 +17,7 @@ public class ConcurrentBatchQueue : IBatchQueue private Func m_NullValidator; - class Entity + private class Entity { public T[] Array { get; set; } @@ -31,7 +30,6 @@ class Entity public ConcurrentBatchQueue() : this(16) { - } /// @@ -41,7 +39,6 @@ public ConcurrentBatchQueue() public ConcurrentBatchQueue(int capacity) : this(new T[capacity]) { - } /// @@ -52,7 +49,6 @@ public ConcurrentBatchQueue(int capacity) public ConcurrentBatchQueue(int capacity, Func nullValidator) : this(new T[capacity], nullValidator) { - } /// @@ -62,7 +58,6 @@ public ConcurrentBatchQueue(int capacity, Func nullValidator) public ConcurrentBatchQueue(T[] array) : this(array, (t) => t == null) { - } /// @@ -113,7 +108,7 @@ private bool TryEnqueue(T item, out bool full) return false; } - if(entity != m_Entity) + if (entity != m_Entity) return false; int oldCount = Interlocked.CompareExchange(ref entity.Count, count + 1, count); @@ -248,4 +243,4 @@ public int Count get { return ((Entity)m_Entity).Count; } } } -} +} \ No newline at end of file diff --git a/Common/ConnectAsyncExtension.Net.cs b/Common/ConnectAsyncExtension.Net.cs index de017d3..88e0b35 100644 --- a/Common/ConnectAsyncExtension.Net.cs +++ b/Common/ConnectAsyncExtension.Net.cs @@ -1,15 +1,12 @@ using System; -using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Reflection; -using System.Text; namespace SuperSocket.ClientEngine { public static partial class ConnectAsyncExtension { - class DnsConnectState + private class DnsConnectState { public IPAddress[] Addresses { get; set; } @@ -68,7 +65,7 @@ private static IPAddress GetNextAddress(DnsConnectState state, out Socket attemp var currentIndex = state.NextAddressIndex; - while(attempSocket == null) + while (attempSocket == null) { if (currentIndex >= state.Addresses.Length) return null; @@ -138,7 +135,7 @@ private static void OnGetHostAddresses(IAsyncResult result) { connectState.Callback(null, connectState.State, null, e); return; - } + } } var socketEventArgs = new SocketAsyncEventArgs(); @@ -152,7 +149,7 @@ private static void OnGetHostAddresses(IAsyncResult result) SocketConnectCompleted(attempSocket, socketEventArgs); } - static void SocketConnectCompleted(object sender, SocketAsyncEventArgs e) + private static void SocketConnectCompleted(object sender, SocketAsyncEventArgs e) { var connectState = e.UserToken as DnsConnectState; @@ -194,4 +191,4 @@ private static void ClearSocketAsyncEventArgs(SocketAsyncEventArgs e) e.UserToken = null; } } -} +} \ No newline at end of file diff --git a/Common/ConnectAsyncExtension.Net35.cs b/Common/ConnectAsyncExtension.Net35.cs index 81e2e8f..c1cd0dd 100644 --- a/Common/ConnectAsyncExtension.Net35.cs +++ b/Common/ConnectAsyncExtension.Net35.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Net; +using System.Net; using System.Net.Sockets; -using System.Reflection; -using System.Text; namespace SuperSocket.ClientEngine { @@ -22,4 +18,4 @@ static partial void CreateAttempSocket(DnsConnectState connectState) connectState.Socket4 = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); } } -} +} \ No newline at end of file diff --git a/Common/ConnectAsyncExtension.Net40.cs b/Common/ConnectAsyncExtension.Net40.cs index ce094d6..fcab154 100644 --- a/Common/ConnectAsyncExtension.Net40.cs +++ b/Common/ConnectAsyncExtension.Net40.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Net; using System.Net.Sockets; using System.Reflection; -using System.Text; namespace SuperSocket.ClientEngine { @@ -58,4 +55,4 @@ static partial void CreateAttempSocket(DnsConnectState connectState) connectState.Socket4 = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); } } -} +} \ No newline at end of file diff --git a/Common/ConnectAsyncExtension.Net45.cs b/Common/ConnectAsyncExtension.Net45.cs index 7fedd3e..0b81fa7 100644 --- a/Common/ConnectAsyncExtension.Net45.cs +++ b/Common/ConnectAsyncExtension.Net45.cs @@ -1,8 +1,6 @@ using System; using System.Net; -using System.Net.NetworkInformation; using System.Net.Sockets; -using System.Text; namespace SuperSocket.ClientEngine { @@ -16,7 +14,7 @@ internal static bool PreferIPv4Stack() public static void ConnectAsync(this EndPoint remoteEndPoint, EndPoint localEndPoint, ConnectedCallback callback, object state) { var e = CreateSocketAsyncEventArgs(remoteEndPoint, callback, state); - + #if NETSTANDARD if (localEndPoint != null) @@ -39,12 +37,12 @@ public static void ConnectAsync(this EndPoint remoteEndPoint, EndPoint localEndP else { Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, e); - } + } #else var socket = PreferIPv4Stack() - ? new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) + ? new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) : new Socket(SocketType.Stream, ProtocolType.Tcp); - + if (localEndPoint != null) { try @@ -58,9 +56,9 @@ public static void ConnectAsync(this EndPoint remoteEndPoint, EndPoint localEndP return; } } - + socket.ConnectAsync(e); #endif } } -} +} \ No newline at end of file diff --git a/Common/ConnectAsyncExtension.cs b/Common/ConnectAsyncExtension.cs index 4a5d8f8..429bcc8 100644 --- a/Common/ConnectAsyncExtension.cs +++ b/Common/ConnectAsyncExtension.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Text; -using System.Net.Sockets; -using System.Reflection; using System.Net; +using System.Net.Sockets; namespace SuperSocket.ClientEngine { @@ -11,14 +8,14 @@ namespace SuperSocket.ClientEngine public static partial class ConnectAsyncExtension { - class ConnectToken + private class ConnectToken { public object State { get; set; } public ConnectedCallback Callback { get; set; } } - static void SocketAsyncEventCompleted(object sender, SocketAsyncEventArgs e) + private static void SocketAsyncEventCompleted(object sender, SocketAsyncEventArgs e) { e.Completed -= SocketAsyncEventCompleted; var token = (ConnectToken)e.UserToken; @@ -26,7 +23,7 @@ static void SocketAsyncEventCompleted(object sender, SocketAsyncEventArgs e) token.Callback(sender as Socket, token.State, e, null); } - static SocketAsyncEventArgs CreateSocketAsyncEventArgs(EndPoint remoteEndPoint, ConnectedCallback callback, object state) + private static SocketAsyncEventArgs CreateSocketAsyncEventArgs(EndPoint remoteEndPoint, ConnectedCallback callback, object state) { var e = new SocketAsyncEventArgs(); @@ -42,4 +39,4 @@ static SocketAsyncEventArgs CreateSocketAsyncEventArgs(EndPoint remoteEndPoint, return e; } } -} +} \ No newline at end of file diff --git a/Common/DnsEndPoint.cs b/Common/DnsEndPoint.cs index cbb8550..fd85d7a 100644 --- a/Common/DnsEndPoint.cs +++ b/Common/DnsEndPoint.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; - -namespace System.Net +namespace System.Net { public class DnsEndPoint : EndPoint { @@ -17,4 +12,4 @@ public DnsEndPoint(string host, int port) Port = port; } } -} +} \ No newline at end of file diff --git a/Common/ExtensionAttribute.cs b/Common/ExtensionAttribute.cs index 9acafea..0911585 100644 --- a/Common/ExtensionAttribute.cs +++ b/Common/ExtensionAttribute.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace System.Runtime.CompilerServices +namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method)] public sealed class ExtensionAttribute : Attribute { - public ExtensionAttribute() { } + public ExtensionAttribute() + { + } } -} +} \ No newline at end of file diff --git a/Common/Extensions.cs b/Common/Extensions.cs index 9790638..69e46fb 100644 --- a/Common/Extensions.cs +++ b/Common/Extensions.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using System.Collections.Specialized; namespace SuperSocket.ClientEngine @@ -218,4 +217,4 @@ public static string GetValue(this NameValueCollection collection, string key, s return e; } } -} +} \ No newline at end of file diff --git a/Common/IBatchQueue.cs b/Common/IBatchQueue.cs index f04a31d..d26f641 100644 --- a/Common/IBatchQueue.cs +++ b/Common/IBatchQueue.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Collections.Generic; namespace SuperSocket.ClientEngine { @@ -42,4 +40,4 @@ public interface IBatchQueue /// int Count { get; } } -} +} \ No newline at end of file diff --git a/Common/IProxyConnector.cs b/Common/IProxyConnector.cs index 8cba38e..756b161 100644 --- a/Common/IProxyConnector.cs +++ b/Common/IProxyConnector.cs @@ -1,7 +1,5 @@ using System; -using System.Text; using System.Net; -using System.Net.Sockets; namespace SuperSocket.ClientEngine { @@ -11,4 +9,4 @@ public interface IProxyConnector event EventHandler Completed; } -} +} \ No newline at end of file diff --git a/Common/PosList.cs b/Common/PosList.cs index 34ed6e4..c7c0a70 100644 --- a/Common/PosList.cs +++ b/Common/PosList.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Collections.Generic; namespace SuperSocket.ClientEngine { @@ -33,4 +31,4 @@ public class PosList : List, IPosList /// public int Position { get; set; } } -} +} \ No newline at end of file diff --git a/Common/ProxyEventArgs.cs b/Common/ProxyEventArgs.cs index dac0646..8298343 100644 --- a/Common/ProxyEventArgs.cs +++ b/Common/ProxyEventArgs.cs @@ -1,5 +1,4 @@ using System; -using System.Text; using System.Net.Sockets; namespace SuperSocket.ClientEngine @@ -9,19 +8,16 @@ public class ProxyEventArgs : EventArgs public ProxyEventArgs(Socket socket) : this(true, socket, null, null) { - } public ProxyEventArgs(Socket socket, string targetHostHame) : this(true, socket, targetHostHame, null) { - } public ProxyEventArgs(Exception exception) : this(false, null, null, exception) { - } public ProxyEventArgs(bool connected, Socket socket, string targetHostName, Exception exception) @@ -40,4 +36,4 @@ public ProxyEventArgs(bool connected, Socket socket, string targetHostName, Exce public string TargetHostName { get; private set; } } -} +} \ No newline at end of file diff --git a/Common/SearchMarkState.cs b/Common/SearchMarkState.cs index 2d38654..c6a56db 100644 --- a/Common/SearchMarkState.cs +++ b/Common/SearchMarkState.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace SuperSocket.ClientEngine { @@ -16,4 +14,4 @@ public SearchMarkState(T[] mark) public int Matched { get; set; } } -} +} \ No newline at end of file diff --git a/Core/AsyncTcpSession.cs b/Core/AsyncTcpSession.cs index 0020987..db06fb5 100644 --- a/Core/AsyncTcpSession.cs +++ b/Core/AsyncTcpSession.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Net; using System.Net.Sockets; -using System.Reflection; -using System.Text; namespace SuperSocket.ClientEngine { @@ -15,7 +11,6 @@ public class AsyncTcpSession : TcpClientSession public AsyncTcpSession() : base() { - } protected override void SocketEventArgsCompleted(object sender, SocketAsyncEventArgs e) @@ -71,16 +66,16 @@ private void ProcessReceive(SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success) { - if(EnsureSocketClosed()) + if (EnsureSocketClosed()) OnClosed(); - if(!IsIgnorableSocketError((int)e.SocketError)) + if (!IsIgnorableSocketError((int)e.SocketError)) OnError(new SocketException((int)e.SocketError)); return; } if (e.BytesTransferred == 0) { - if(EnsureSocketClosed()) + if (EnsureSocketClosed()) OnClosed(); return; } @@ -89,7 +84,7 @@ private void ProcessReceive(SocketAsyncEventArgs e) StartReceive(); } - void StartReceive() + private void StartReceive() { bool raiseEvent; @@ -120,9 +115,9 @@ void StartReceive() return; } - catch(Exception e) + catch (Exception e) { - if(!IsIgnorableException(e)) + if (!IsIgnorableException(e)) OnError(e); if (EnsureSocketClosed(client)) @@ -169,7 +164,6 @@ protected override void SendInternal(PosList> items) m_SocketEventArgsSend.SetBuffer(currentItem.Array, currentItem.Offset, currentItem.Count); } - raiseEvent = Client.SendAsync(m_SocketEventArgsSend); } @@ -199,11 +193,11 @@ protected override void SendInternal(PosList> items) Sending_Completed(Client, m_SocketEventArgsSend); } - void Sending_Completed(object sender, SocketAsyncEventArgs e) + private void Sending_Completed(object sender, SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success || e.BytesTransferred == 0) { - if(EnsureSocketClosed()) + if (EnsureSocketClosed()) OnClosed(); if (e.SocketError != SocketError.Success && !IsIgnorableSocketError((int)e.SocketError)) @@ -232,4 +226,4 @@ protected override void OnClosed() base.OnClosed(); } } -} +} \ No newline at end of file diff --git a/Core/AuthenticatedStreamTcpSession.cs b/Core/AuthenticatedStreamTcpSession.cs index 08f942e..376db06 100644 --- a/Core/AuthenticatedStreamTcpSession.cs +++ b/Core/AuthenticatedStreamTcpSession.cs @@ -1,23 +1,18 @@ using System; -using System.Collections.Generic; -using System.Text; -using System.Net; -using System.Net.Sockets; using System.Net.Security; -using System.Threading; +using System.Net.Sockets; + #if NETSTANDARD using System.Threading.Tasks; #endif #if !SILVERLIGHT -using System.Security.Authentication; #endif -using System.Security.Cryptography.X509Certificates; namespace SuperSocket.ClientEngine { public abstract class AuthenticatedStreamTcpSession : TcpClientSession { - class StreamAsyncState + private class StreamAsyncState { public AuthenticatedStream Stream { get; set; } @@ -27,15 +22,12 @@ class StreamAsyncState } private AuthenticatedStream m_Stream; - public AuthenticatedStreamTcpSession() : base() { - } - #if !SILVERLIGHT public SecurityOption Security { get; set; } @@ -61,14 +53,14 @@ protected override void OnGetSocket(SocketAsyncEventArgs e) OnError(exc); } } - + protected void OnAuthenticatedStreamConnected(AuthenticatedStream stream) { m_Stream = stream; OnConnected(); - if(Buffer.Array == null) + if (Buffer.Array == null) { var receiveBufferSize = ReceiveBufferSize; @@ -82,7 +74,7 @@ protected void OnAuthenticatedStreamConnected(AuthenticatedStream stream) BeginRead(); } - + #if !NETSTANDARD private void OnDataRead(IAsyncResult result) @@ -125,9 +117,10 @@ private void OnDataRead(IAsyncResult result) OnDataReceived(Buffer.Array, Buffer.Offset, length); BeginRead(); } + #endif - void BeginRead() + private void BeginRead() { #if NETSTANDARD ReadAsync(); @@ -135,7 +128,7 @@ void BeginRead() StartRead(); #endif } - + #if NETSTANDARD private async void ReadAsync() { @@ -145,11 +138,11 @@ private async void ReadAsync() if (client == null || m_Stream == null) return; - + var buffer = Buffer; - + var length = 0; - + try { length = await m_Stream.ReadAsync(buffer.Array, buffer.Offset, buffer.Count, CancellationToken.None); @@ -178,29 +171,30 @@ private async void ReadAsync() } #else - void StartRead() - { - var client = Client; + private void StartRead() + { + var client = Client; - if (client == null || m_Stream == null) - return; + if (client == null || m_Stream == null) + return; - try - { - var buffer = Buffer; - m_Stream.BeginRead(buffer.Array, buffer.Offset, buffer.Count, OnDataRead, new StreamAsyncState { Stream = m_Stream, Client = client }); - } - catch (Exception e) - { - if (!IsIgnorableException(e)) - OnError(e); + try + { + var buffer = Buffer; + m_Stream.BeginRead(buffer.Array, buffer.Offset, buffer.Count, OnDataRead, new StreamAsyncState { Stream = m_Stream, Client = client }); + } + catch (Exception e) + { + if (!IsIgnorableException(e)) + OnError(e); - if (EnsureSocketClosed(client)) - OnClosed(); + if (EnsureSocketClosed(client)) + OnClosed(); + } } - } #endif + protected override bool IsIgnorableException(Exception e) { if (base.IsIgnorableException(e)) @@ -221,7 +215,9 @@ protected override bool IsIgnorableException(Exception e) return false; } + #if !NETSTANDARD + protected override void SendInternal(PosList> items) { var client = this.Client; @@ -297,12 +293,13 @@ private void OnWriteComplete(IAsyncResult result) OnSendingCompleted(); } + #else protected override void SendInternal(PosList> items) { SendInternalAsync(items); } - + private async void SendInternalAsync(PosList> items) { try @@ -312,7 +309,7 @@ private async void SendInternalAsync(PosList> items) var item = items[i]; await m_Stream.WriteAsync(item.Array, item.Offset, item.Count, CancellationToken.None); } - + m_Stream.Flush(); } catch (Exception e) @@ -322,13 +319,13 @@ private async void SendInternalAsync(PosList> items) if (EnsureSocketClosed(Client)) OnClosed(); - + return; } - + OnSendingCompleted(); } - + #endif public override void Close() @@ -347,4 +344,4 @@ public override void Close() base.Close(); } } -} +} \ No newline at end of file diff --git a/Core/ClientSession.cs b/Core/ClientSession.cs index 63366ff..68c842c 100644 --- a/Core/ClientSession.cs +++ b/Core/ClientSession.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Text; using System.Threading; namespace SuperSocket.ClientEngine @@ -10,7 +9,7 @@ namespace SuperSocket.ClientEngine public abstract class ClientSession : IClientSession, IBufferSetter { public const int DefaultReceiveBufferSize = 4096; - + protected Socket Client { get; set; } Socket IClientSession.Socket @@ -28,7 +27,6 @@ Socket IClientSession.Socket public ClientSession() { - } public int SendingQueueSize { get; set; } @@ -45,6 +43,7 @@ public void Send(byte[] data, int offset, int length) } #if NO_SPINWAIT_CLASS + public void Send(ArraySegment segment) { if (TrySend(segment)) @@ -72,7 +71,9 @@ public void Send(IList> segments) return; } } + #else + public void Send(ArraySegment segment) { if (TrySend(segment)) @@ -104,6 +105,7 @@ public void Send(IList> segments) return; } } + #endif public abstract void Close(); @@ -119,7 +121,7 @@ public event EventHandler Closed protected virtual void OnClosed() { IsConnected = false; - LocalEndPoint = null; + LocalEndPoint = null; var handler = m_Closed; @@ -156,11 +158,11 @@ protected virtual void OnConnected() { var client = Client; - if(client != null) + if (client != null) { try { - if(client.NoDelay != NoDelay) + if (client.NoDelay != NoDelay) client.NoDelay = NoDelay; } catch @@ -216,4 +218,4 @@ protected virtual void SetBuffer(ArraySegment bufferSegment) Buffer = bufferSegment; } } -} +} \ No newline at end of file diff --git a/Core/ConcurrentQueue.cs b/Core/ConcurrentQueue.cs index 4b71441..49fb699 100644 --- a/Core/ConcurrentQueue.cs +++ b/Core/ConcurrentQueue.cs @@ -1,6 +1,4 @@ -using System; -using System.Net; -using System.Collections.Generic; +using System.Collections.Generic; namespace System.Collections.Concurrent { @@ -48,4 +46,4 @@ public bool TryDequeue(out T item) } } } -} +} \ No newline at end of file diff --git a/Core/DataEventArgs.cs b/Core/DataEventArgs.cs index c0e3d54..248cede 100644 --- a/Core/DataEventArgs.cs +++ b/Core/DataEventArgs.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace SuperSocket.ClientEngine { @@ -12,4 +10,4 @@ public class DataEventArgs : EventArgs public int Length { get; set; } } -} +} \ No newline at end of file diff --git a/Core/ErrorEventArgs.cs b/Core/ErrorEventArgs.cs index f461480..f54956f 100644 --- a/Core/ErrorEventArgs.cs +++ b/Core/ErrorEventArgs.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace SuperSocket.ClientEngine { @@ -13,4 +11,4 @@ public ErrorEventArgs(Exception exception) Exception = exception; } } -} +} \ No newline at end of file diff --git a/Core/IBufferSetter.cs b/Core/IBufferSetter.cs index f1ace89..5dcd626 100644 --- a/Core/IBufferSetter.cs +++ b/Core/IBufferSetter.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace SuperSocket.ClientEngine { @@ -8,4 +6,4 @@ public interface IBufferSetter { void SetBuffer(ArraySegment bufferSegment); } -} +} \ No newline at end of file diff --git a/Core/IClientSession.cs b/Core/IClientSession.cs index 7ccfffc..68d0de5 100644 --- a/Core/IClientSession.cs +++ b/Core/IClientSession.cs @@ -2,15 +2,13 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Reflection; -using System.Text; namespace SuperSocket.ClientEngine { public interface IClientSession { Socket Socket { get; } - + IProxyConnector Proxy { get; set; } int ReceiveBufferSize { get; set; } @@ -41,4 +39,4 @@ public interface IClientSession event EventHandler DataReceived; } -} +} \ No newline at end of file diff --git a/Core/SecurityOption.cs b/Core/SecurityOption.cs index 50ed684..22c2533 100644 --- a/Core/SecurityOption.cs +++ b/Core/SecurityOption.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; +using System.Net; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; -using System.Text; namespace SuperSocket.ClientEngine { @@ -38,26 +34,21 @@ public class SecurityOption /// public bool AllowCertificateChainErrors { get; set; } - public NetworkCredential Credential { get; set; } - public SecurityOption() : this(GetDefaultProtocol(), new X509CertificateCollection()) { - } public SecurityOption(SslProtocols enabledSslProtocols) : this(enabledSslProtocols, new X509CertificateCollection()) { - } public SecurityOption(SslProtocols enabledSslProtocols, X509Certificate certificate) : this(enabledSslProtocols, new X509CertificateCollection(new X509Certificate[] { certificate })) { - } public SecurityOption(SslProtocols enabledSslProtocols, X509CertificateCollection certificates) @@ -70,7 +61,7 @@ public SecurityOption(NetworkCredential credential) { Credential = credential; } - + private static SslProtocols GetDefaultProtocol() { #if NETSTANDARD @@ -80,4 +71,4 @@ private static SslProtocols GetDefaultProtocol() #endif } } -} +} \ No newline at end of file diff --git a/Core/SslStreamTcpSession.cs b/Core/SslStreamTcpSession.cs index 9a1ac27..01de4ba 100644 --- a/Core/SslStreamTcpSession.cs +++ b/Core/SslStreamTcpSession.cs @@ -1,16 +1,14 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Net; using System.Net.Sockets; using System.Net.Security; -using System.Threading; + #if NETSTANDARD using System.Threading.Tasks; #endif #if !SILVERLIGHT -using System.Security.Authentication; #endif + using System.Security.Cryptography.X509Certificates; namespace SuperSocket.ClientEngine @@ -23,22 +21,22 @@ protected override void StartAuthenticatedStream(Socket client) var sslStream = new SslStream(new NetworkStream(client)); sslStream.BeginAuthenticateAsClient(HostName, OnAuthenticated, sslStream); #else - var securityOption = Security; + var securityOption = Security; - if (securityOption == null) - { - throw new Exception("securityOption was not configured"); - } + if (securityOption == null) + { + throw new Exception("securityOption was not configured"); + } #if NETSTANDARD - AuthenticateAsClientAsync(new SslStream(new NetworkStream(client), false, ValidateRemoteCertificate), Security); - + AuthenticateAsClientAsync(new SslStream(new NetworkStream(client), false, ValidateRemoteCertificate), Security); + #else - var sslStream = new SslStream(new NetworkStream(client), false, ValidateRemoteCertificate); - sslStream.BeginAuthenticateAsClient(HostName, securityOption.Certificates, securityOption.EnabledSslProtocols, false, OnAuthenticated, sslStream); - + var sslStream = new SslStream(new NetworkStream(client), false, ValidateRemoteCertificate); + sslStream.BeginAuthenticateAsClient(HostName, securityOption.Certificates, securityOption.EnabledSslProtocols, false, OnAuthenticated, sslStream); + #endif #endif } @@ -56,18 +54,18 @@ private async void AuthenticateAsClientAsync(SslStream sslStream, SecurityOption OnError(e); return; } - + OnAuthenticatedStreamConnected(sslStream); } #endif - - + #if !NETSTANDARD + private void OnAuthenticated(IAsyncResult result) { var sslStream = result.AsyncState as SslStream; - if(sslStream == null) + if (sslStream == null) { EnsureSocketClosed(); OnError(new NullReferenceException("Ssl Stream is null OnAuthenticated")); @@ -78,7 +76,7 @@ private void OnAuthenticated(IAsyncResult result) { sslStream.EndAuthenticateAsClient(result); } - catch(Exception e) + catch (Exception e) { EnsureSocketClosed(); OnError(e); @@ -87,9 +85,11 @@ private void OnAuthenticated(IAsyncResult result) OnAuthenticatedStreamConnected(sslStream); } + #endif #if !SILVERLIGHT + /// /// Validates the remote certificate. /// @@ -143,7 +143,7 @@ private bool ValidateRemoteCertificate(object sender, X509Certificate certificat if ((certificate.Subject == certificate.Issuer) && (status.Status == X509ChainStatusFlags.UntrustedRoot)) { - // Self-signed certificates with an untrusted root are valid. + // Self-signed certificates with an untrusted root are valid. continue; } else @@ -159,11 +159,12 @@ private bool ValidateRemoteCertificate(object sender, X509Certificate certificat } } - // When processing reaches this line, the only errors in the certificate chain are + // When processing reaches this line, the only errors in the certificate chain are // untrusted root errors for self-signed certificates. These certificates are valid // for default Exchange server installations, so return true. return true; } + #endif } -} +} \ No newline at end of file diff --git a/Core/TcpClientSession.cs b/Core/TcpClientSession.cs index 015dbcb..9b1b1b3 100644 --- a/Core/TcpClientSession.cs +++ b/Core/TcpClientSession.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Text; using System.Threading; namespace SuperSocket.ClientEngine @@ -11,15 +10,15 @@ public abstract class TcpClientSession : ClientSession { protected string HostName { get; private set; } - private bool m_InConnecting = false; + private bool m_InConnecting = false; public TcpClientSession() : base() { - } #if !SILVERLIGHT + public override EndPoint LocalEndPoint { get @@ -35,6 +34,7 @@ public override EndPoint LocalEndPoint base.LocalEndPoint = value; } } + #endif public override int ReceiveBufferSize @@ -130,7 +130,7 @@ public override void Connect(EndPoint remoteEndPoint) #endif } - void Proxy_Completed(object sender, ProxyEventArgs e) + private void Proxy_Completed(object sender, ProxyEventArgs e) { Proxy.Completed -= new EventHandler(Proxy_Completed); @@ -159,7 +159,7 @@ protected void ProcessConnect(Socket socket, object state, SocketAsyncEventArgs if (e != null) e.Dispose(); - + return; } @@ -194,7 +194,7 @@ protected void ProcessConnect(Socket socket, object state, SocketAsyncEventArgs catch (Exception) { socketError = SocketError.HostUnreachable; - } + } #endif OnError(new SocketException((int)socketError)); return; @@ -247,7 +247,7 @@ protected void ProcessConnect(Socket socket, object state, SocketAsyncEventArgs catch { } - + #endif OnGetSocket(e); } @@ -264,7 +264,7 @@ private string GetHostOfEndPoint(EndPoint endPoint) var ipEndPoint = endPoint as IPEndPoint; if (ipEndPoint != null && ipEndPoint.Address != null) - return ipEndPoint.Address.ToString(); + return ipEndPoint.Address.ToString(); return string.Empty; } @@ -301,19 +301,19 @@ protected bool EnsureSocketClosed(Socket prevClient) client.Shutdown(SocketShutdown.Both); } catch - {} + { } finally { try { -#if NETFX_CORE +#if NETFX_CORE client.Dispose(); #else client.Close(); #endif } catch - {} + { } } return fireOnClosedEvent; @@ -371,7 +371,7 @@ public override bool TrySend(ArraySegment segment) if (!DetectConnected()) { - //may be return false? + //may be return false? return true; } @@ -395,7 +395,7 @@ public override bool TrySend(IList> segments) for (var i = 0; i < segments.Count; i++) { var seg = segments[i]; - + if (seg.Count == 0) { throw new Exception("The data piece to be sent cannot be empty."); @@ -404,7 +404,7 @@ public override bool TrySend(IList> segments) if (!DetectConnected()) { - //may be return false? + //may be return false? return true; } @@ -454,4 +454,4 @@ public override void Close() OnClosed(); } } -} +} \ No newline at end of file diff --git a/EasyClient.cs b/EasyClient.cs index b58de44..764f598 100644 --- a/EasyClient.cs +++ b/EasyClient.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SuperSocket.ProtoBase; -using System.Net; namespace SuperSocket.ClientEngine { @@ -36,7 +31,6 @@ public class EasyClient : EasyClientBase public EasyClient() { - } public virtual void Initialize(IReceiveFilter receiveFilter) @@ -54,4 +48,4 @@ protected override void HandlePackage(IPackageInfo package) handler(this, new PackageEventArgs((TPackageInfo)package)); } } -} +} \ No newline at end of file diff --git a/EasyClientBase.Net20.cs b/EasyClientBase.Net20.cs index 9bc0c5d..fef0edc 100644 --- a/EasyClientBase.Net20.cs +++ b/EasyClientBase.Net20.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading; -using SuperSocket.ProtoBase; using System.Net; using System.Net.Sockets; +using System.Threading; namespace SuperSocket.ClientEngine { @@ -28,7 +26,7 @@ public EndPoint LocalEndPoint { if (m_LocalEndPoint != null) return m_LocalEndPoint; - + return m_EndPointToBind; } set @@ -58,7 +56,6 @@ public Socket Socket public EasyClientBase() { - } public bool IsConnected { get { return m_Connected; } } @@ -109,7 +106,7 @@ public void BeginConnect(EndPoint remoteEndPoint) m_Session = session; session.Connect(remoteEndPoint); } - + public void Send(byte[] data) { Send(new ArraySegment(data, 0, data.Length)); @@ -118,7 +115,7 @@ public void Send(byte[] data) public void Send(ArraySegment segment) { var session = m_Session; - + if (!m_Connected || session == null) throw new Exception("The socket is not connected."); @@ -128,7 +125,7 @@ public void Send(ArraySegment segment) public void Send(List> segments) { var session = m_Session; - + if (!m_Connected || session == null) throw new Exception("The socket is not connected."); @@ -138,14 +135,14 @@ public void Send(List> segments) public void Close() { var session = m_Session; - + if (session != null && m_Connected) { session.Close(); } } - void OnSessionDataReceived(object sender, DataEventArgs e) + private void OnSessionDataReceived(object sender, DataEventArgs e) { var result = PipeLineProcessor.Process(new ArraySegment(e.Data, e.Offset, e.Length)); @@ -179,7 +176,7 @@ void OnSessionDataReceived(object sender, DataEventArgs e) } } - void OnSessionError(object sender, ErrorEventArgs e) + private void OnSessionError(object sender, ErrorEventArgs e) { if (!m_Connected) { @@ -204,7 +201,7 @@ private void OnError(ErrorEventArgs args) public event EventHandler Error; - void OnSessionClosed(object sender, EventArgs e) + private void OnSessionClosed(object sender, EventArgs e) { m_Connected = false; m_LocalEndPoint = null; @@ -213,7 +210,7 @@ void OnSessionClosed(object sender, EventArgs e) if (pipelineProcessor != null) pipelineProcessor.Reset(); - + var handler = Closed; if (handler != null) @@ -224,21 +221,21 @@ void OnSessionClosed(object sender, EventArgs e) public event EventHandler Closed; - void OnSessionConnected(object sender, EventArgs e) + private void OnSessionConnected(object sender, EventArgs e) { m_Connected = true; - + var session = sender as TcpClientSession; - + if (session != null) { m_LocalEndPoint = session.LocalEndPoint; } - + m_ConnectEvent.Set(); var handler = Connected; - + if (handler != null) { handler(this, EventArgs.Empty); @@ -249,4 +246,4 @@ void OnSessionConnected(object sender, EventArgs e) protected abstract void HandlePackage(IPackageInfo package); } -} +} \ No newline at end of file diff --git a/EasyClientBase.cs b/EasyClientBase.cs index 09ade8d..6120f4f 100644 --- a/EasyClientBase.cs +++ b/EasyClientBase.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SuperSocket.ProtoBase; using System.Net; -using System.Threading; using System.Net.Sockets; +using System.Threading; +using System.Threading.Tasks; namespace SuperSocket.ClientEngine { @@ -34,7 +32,7 @@ public EndPoint LocalEndPoint { if (m_LocalEndPoint != null) return m_LocalEndPoint; - + return m_EndPointToBind; } set @@ -42,6 +40,7 @@ public EndPoint LocalEndPoint m_EndPointToBind = value; } } + #endif public bool NoDelay { get; set; } @@ -65,14 +64,12 @@ public Socket Socket public EasyClientBase() { - } public bool IsConnected { get { return m_Connected; } } - - #if AWAIT + public async Task ConnectAsync(EndPoint remoteEndPoint) { if (PipeLineProcessor == null) @@ -81,7 +78,9 @@ public async Task ConnectAsync(EndPoint remoteEndPoint) var connectTaskSrc = m_ConnectTaskSource = InitConnect(remoteEndPoint); return await connectTaskSrc.Task.ConfigureAwait(false); } + #else + public Task ConnectAsync(EndPoint remoteEndPoint) { if (PipeLineProcessor == null) @@ -90,6 +89,7 @@ public Task ConnectAsync(EndPoint remoteEndPoint) var connectTaskSrc = InitConnect(remoteEndPoint); return connectTaskSrc.Task; } + #endif private TcpClientSession GetUnderlyingSession() @@ -104,7 +104,7 @@ private TcpClientSession GetUnderlyingSession() return new AsyncTcpSession(); } - #if SILVERLIGHT +#if SILVERLIGHT // no SSL/TLS enabled if (!security.EnabledSslProtocols) { @@ -112,7 +112,7 @@ private TcpClientSession GetUnderlyingSession() } return new SslStreamTcpSession(); - #else +#else // no SSL/TLS enabled if (security.EnabledSslProtocols == System.Security.Authentication.SslProtocols.None) { @@ -123,7 +123,7 @@ private TcpClientSession GetUnderlyingSession() { Security = security }; - #endif +#endif #endif } @@ -144,7 +144,7 @@ private TaskCompletionSource InitConnect(EndPoint remoteEndPoint) if (Proxy != null) session.Proxy = Proxy; - + session.Connected += new EventHandler(OnSessionConnected); session.Error += new EventHandler(OnSessionError); session.Closed += new EventHandler(OnSessionClosed); @@ -154,14 +154,14 @@ private TaskCompletionSource InitConnect(EndPoint remoteEndPoint) session.ReceiveBufferSize = ReceiveBufferSize; m_Session = session; - + var taskSrc = m_ConnectTaskSource = new TaskCompletionSource(); session.Connect(remoteEndPoint); - + return taskSrc; } - + public void Send(byte[] data) { Send(new ArraySegment(data, 0, data.Length)); @@ -170,8 +170,8 @@ public void Send(byte[] data) public void Send(ArraySegment segment) { var session = m_Session; - - if(!m_Connected || session == null) + + if (!m_Connected || session == null) throw new Exception("The socket is not connected."); session.Send(segment); @@ -180,19 +180,20 @@ public void Send(ArraySegment segment) public void Send(List> segments) { var session = m_Session; - - if(!m_Connected || session == null) + + if (!m_Connected || session == null) throw new Exception("The socket is not connected."); session.Send(segments); } #if AWAIT + public async Task Close() { var session = m_Session; - - if(session != null && m_Connected) + + if (session != null && m_Connected) { var closeTaskSrc = new TaskCompletionSource(); m_CloseTaskSource = closeTaskSrc; @@ -202,12 +203,14 @@ public async Task Close() return await Task.FromResult(false); } - #else + +#else + public Task Close() { var session = m_Session; - - if(session != null && m_Connected) + + if (session != null && m_Connected) { var closeTaskSrc = new TaskCompletionSource(); m_CloseTaskSource = closeTaskSrc; @@ -217,9 +220,10 @@ public Task Close() return new Task(() => false); } - #endif - void OnSessionDataReceived(object sender, DataEventArgs e) +#endif + + private void OnSessionDataReceived(object sender, DataEventArgs e) { var result = PipeLineProcessor.Process(new ArraySegment(e.Data, e.Offset, e.Length)); @@ -253,7 +257,7 @@ void OnSessionDataReceived(object sender, DataEventArgs e) } } - void OnSessionError(object sender, ErrorEventArgs e) + private void OnSessionError(object sender, ErrorEventArgs e) { if (!m_Connected) { @@ -263,7 +267,7 @@ void OnSessionError(object sender, ErrorEventArgs e) OnError(e); } - bool FinishConnectTask(bool result) + private bool FinishConnectTask(bool result) { var connectTaskSource = m_ConnectTaskSource; @@ -288,13 +292,13 @@ private void OnError(ErrorEventArgs args) { var handler = Error; - if(handler != null) + if (handler != null) handler(this, args); } public event EventHandler Error; - void OnSessionClosed(object sender, EventArgs e) + private void OnSessionClosed(object sender, EventArgs e) { m_Connected = false; @@ -312,23 +316,20 @@ void OnSessionClosed(object sender, EventArgs e) if (handler != null) handler(this, EventArgs.Empty); - var closeTaskSrc = m_CloseTaskSource; - - if(closeTaskSrc != null) + + if (closeTaskSrc != null) { - if(Interlocked.CompareExchange(ref m_CloseTaskSource, null, closeTaskSrc) == closeTaskSrc) + if (Interlocked.CompareExchange(ref m_CloseTaskSource, null, closeTaskSrc) == closeTaskSrc) { closeTaskSrc.SetResult(true); } } - - } public event EventHandler Closed; - void OnSessionConnected(object sender, EventArgs e) + private void OnSessionConnected(object sender, EventArgs e) { m_Connected = true; @@ -343,7 +344,7 @@ void OnSessionConnected(object sender, EventArgs e) FinishConnectTask(true); var handler = Connected; - if(handler != null) + if (handler != null) { handler(this, EventArgs.Empty); } @@ -353,4 +354,4 @@ void OnSessionConnected(object sender, EventArgs e) protected abstract void HandlePackage(IPackageInfo package); } -} +} \ No newline at end of file diff --git a/Func.cs b/Func.cs index ac6db1f..4bd291e 100644 --- a/Func.cs +++ b/Func.cs @@ -13,4 +13,4 @@ namespace System public delegate TResult Func(T1 t1, T2 t2, T3 t3); public delegate TResult Func(T1 t1, T2 t2, T3 t3, T4 t4); -} +} \ No newline at end of file diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs index 700b727..df8d0cc 100644 --- a/GlobalAssemblyInfo.cs +++ b/GlobalAssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; [assembly: AssemblyVersion("0.9.0.0")] [assembly: AssemblyFileVersion("0.9.0.0")] diff --git a/LINQ.cs b/LINQ.cs index acaa950..ecf5123 100644 --- a/LINQ.cs +++ b/LINQ.cs @@ -99,4 +99,4 @@ public int Compare(TSource x, TSource y) return m_Getter(x).CompareTo(m_Getter(y)); } } -} +} \ No newline at end of file diff --git a/PackageEventArgs.cs b/PackageEventArgs.cs index e55bd8d..1432924 100644 --- a/PackageEventArgs.cs +++ b/PackageEventArgs.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SuperSocket.ProtoBase; namespace SuperSocket.ClientEngine { @@ -16,4 +12,4 @@ public PackageEventArgs(TPackageInfo package) Package = package; } } -} +} \ No newline at end of file diff --git a/Properties/AssemblyInfo.Net20.cs b/Properties/AssemblyInfo.Net20.cs index 8438aa3..e3f5b1d 100644 --- a/Properties/AssemblyInfo.Net20.cs +++ b/Properties/AssemblyInfo.Net20.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("SuperSocket.ClientEngine")] diff --git a/Properties/AssemblyInfo.Net35.cs b/Properties/AssemblyInfo.Net35.cs index 74e1c0d..4b676f2 100644 --- a/Properties/AssemblyInfo.Net35.cs +++ b/Properties/AssemblyInfo.Net35.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("SuperSocket.ClientEngine")] diff --git a/Properties/AssemblyInfo.Net40.cs b/Properties/AssemblyInfo.Net40.cs index 910480d..f005e51 100644 --- a/Properties/AssemblyInfo.Net40.cs +++ b/Properties/AssemblyInfo.Net40.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("SuperSocket.ClientEngine")] diff --git a/Properties/AssemblyInfo.Net45.cs b/Properties/AssemblyInfo.Net45.cs index a5ac29e..8d1a3f1 100644 --- a/Properties/AssemblyInfo.Net45.cs +++ b/Properties/AssemblyInfo.Net45.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("SuperSocket.ClientEngine")] diff --git a/Properties/AssemblyInfo.UWP.cs b/Properties/AssemblyInfo.UWP.cs index b7d20eb..076ea2c 100644 --- a/Properties/AssemblyInfo.UWP.cs +++ b/Properties/AssemblyInfo.UWP.cs @@ -1,8 +1,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - [assembly: AssemblyTitle("SuperSocket.ClientEngine")] [assembly: AssemblyDescription("SuperSocket.ClientEngine for Universal Windows Platform")] [assembly: AssemblyConfiguration("")] diff --git a/Properties/AssemblyInfo.iOS.cs b/Properties/AssemblyInfo.iOS.cs index 6bb18e1..296364f 100644 --- a/Properties/AssemblyInfo.iOS.cs +++ b/Properties/AssemblyInfo.iOS.cs @@ -1,8 +1,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - [assembly: AssemblyTitle("SuperSocket.ClientEngine")] [assembly: AssemblyDescription("SuperSocket.ClientEngine for iOS Unified API")] [assembly: AssemblyConfiguration("")] diff --git a/Properties/SuperSocket.ClientEngine.rd.xml b/Properties/SuperSocket.ClientEngine.rd.xml index ad4b300..63c703a 100644 --- a/Properties/SuperSocket.ClientEngine.rd.xml +++ b/Properties/SuperSocket.ClientEngine.rd.xml @@ -28,6 +28,5 @@ - - + \ No newline at end of file diff --git a/Protocol/DelegateCommand.cs b/Protocol/DelegateCommand.cs index 2316987..4ce8aaf 100644 --- a/Protocol/DelegateCommand.cs +++ b/Protocol/DelegateCommand.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Text; -using SuperSocket.ClientEngine; -using SuperSocket.ProtoBase; - -namespace SuperSocket.ClientEngine.Protocol +namespace SuperSocket.ClientEngine.Protocol { public delegate void CommandDelegate(TClientSession session, TPackageInfo packageInfo); - class DelegateCommand : ICommand + internal class DelegateCommand : ICommand where TClientSession : class where TPackageInfo : IPackageInfo { @@ -27,4 +21,4 @@ public void ExecuteCommand(TClientSession session, TPackageInfo packageInfo) public string Name { get; private set; } } -} +} \ No newline at end of file diff --git a/Protocol/ICommand.cs b/Protocol/ICommand.cs index 744b566..2e21471 100644 --- a/Protocol/ICommand.cs +++ b/Protocol/ICommand.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using SuperSocket.ProtoBase; - -namespace SuperSocket.ClientEngine.Protocol +namespace SuperSocket.ClientEngine.Protocol { public interface ICommand { @@ -16,4 +11,4 @@ public interface ICommand : ICommand { void ExecuteCommand(TSession session, TPackageInfo packageInfo); } -} +} \ No newline at end of file diff --git a/Proxy/HttpConnectProxy.cs b/Proxy/HttpConnectProxy.cs index b57c27d..dfb4e85 100644 --- a/Proxy/HttpConnectProxy.cs +++ b/Proxy/HttpConnectProxy.cs @@ -2,14 +2,12 @@ using System.IO; using System.Net; using System.Net.Sockets; -using System.Text; -using SuperSocket.ClientEngine; namespace SuperSocket.ClientEngine.Proxy { public class HttpConnectProxy : ProxyConnectorBase { - class ConnectContext + private class ConnectContext { public Socket Socket { get; set; } @@ -34,7 +32,6 @@ static HttpConnectProxy() public HttpConnectProxy(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol clientAccessPolicyProtocol) : this(proxyEndPoint, clientAccessPolicyProtocol, 128) { - } public HttpConnectProxy(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol clientAccessPolicyProtocol, int receiveBufferSize) @@ -43,16 +40,15 @@ public HttpConnectProxy(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol m_ReceiveBufferSize = receiveBufferSize; } #else + public HttpConnectProxy(EndPoint proxyEndPoint) : this(proxyEndPoint, 128, null) { - } public HttpConnectProxy(EndPoint proxyEndPoint, string targetHostName) : this(proxyEndPoint, 128, targetHostName) { - } public HttpConnectProxy(EndPoint proxyEndPoint, int receiveBufferSize, string targetHostName) @@ -60,6 +56,7 @@ public HttpConnectProxy(EndPoint proxyEndPoint, int receiveBufferSize, string ta { m_ReceiveBufferSize = receiveBufferSize; } + #endif public override void Connect(EndPoint remoteEndPoint) @@ -159,7 +156,7 @@ protected override void ProcessReceive(SocketAsyncEventArgs e) { int total = e.Offset + e.BytesTransferred; - if(total >= m_ReceiveBufferSize) + if (total >= m_ReceiveBufferSize) { OnException("receive buffer size has been exceeded"); return; @@ -224,4 +221,4 @@ protected override void ProcessReceive(SocketAsyncEventArgs e) OnCompleted(new ProxyEventArgs(context.Socket, TargetHostHame)); } } -} +} \ No newline at end of file diff --git a/Proxy/ProxyConnectorBase.cs b/Proxy/ProxyConnectorBase.cs index 6db53da..0c65fd7 100644 --- a/Proxy/ProxyConnectorBase.cs +++ b/Proxy/ProxyConnectorBase.cs @@ -1,8 +1,7 @@ using System; -using System.Text; using System.Net; using System.Net.Sockets; -using SuperSocket.ClientEngine; +using System.Text; namespace SuperSocket.ClientEngine.Proxy { @@ -24,16 +23,18 @@ public ProxyConnectorBase(EndPoint proxyEndPoint, SocketClientAccessPolicyProtoc } #else + public ProxyConnectorBase(EndPoint proxyEndPoint) : this(proxyEndPoint, null) { - } + public ProxyConnectorBase(EndPoint proxyEndPoint, string targetHostHame) { ProxyEndPoint = proxyEndPoint; TargetHostHame = targetHostHame; } + #endif public abstract void Connect(EndPoint remoteEndPoint); @@ -130,4 +131,4 @@ protected virtual void StartReceive(Socket socket, SocketAsyncEventArgs e) protected abstract void ProcessReceive(SocketAsyncEventArgs e); } -} +} \ No newline at end of file diff --git a/Proxy/Socks4Connector.cs b/Proxy/Socks4Connector.cs index 02f71da..5ea36b5 100644 --- a/Proxy/Socks4Connector.cs +++ b/Proxy/Socks4Connector.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System; using System.Net; using System.Net.Sockets; -using SuperSocket.ClientEngine; namespace SuperSocket.ClientEngine.Proxy { - class ReceiveState + internal class ReceiveState { public ReceiveState(byte[] buffer) { @@ -30,11 +27,13 @@ public Socks4Connector(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol UserID = userID; } #else + public Socks4Connector(EndPoint proxyEndPoint, string userID) : base(proxyEndPoint) { UserID = userID; } + #endif public override void Connect(EndPoint remoteEndPoint) @@ -183,12 +182,15 @@ protected virtual void HandleFaultStatus(byte status) case (0x5b): message = "request rejected or failed"; break; + case (0x5c): message = "request failed because client is not running identd (or not reachable from the server)"; break; + case (0x5d): message = "request failed because client's identd could not confirm the user ID string in the reques"; break; + default: message = "request rejected for unknown error"; break; @@ -197,4 +199,4 @@ protected virtual void HandleFaultStatus(byte status) OnException(message); } } -} +} \ No newline at end of file diff --git a/Proxy/Socks4aConnector.cs b/Proxy/Socks4aConnector.cs index 75c7c77..7568eba 100644 --- a/Proxy/Socks4aConnector.cs +++ b/Proxy/Socks4aConnector.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Net; -using System.Net.Sockets; -using SuperSocket.ClientEngine; namespace SuperSocket.ClientEngine.Proxy { @@ -15,14 +11,14 @@ public class Socks4aConnector : Socks4Connector public Socks4aConnector(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol clientAccessPolicyProtocol, string userID) : base(proxyEndPoint, clientAccessPolicyProtocol, userID) { - } #else + public Socks4aConnector(EndPoint proxyEndPoint, string userID) : base(proxyEndPoint, userID) { - } + #endif public override void Connect(EndPoint remoteEndPoint) @@ -94,12 +90,15 @@ protected override void HandleFaultStatus(byte status) case (0x5b): message = "request rejected or failed"; break; + case (0x5c): message = "request failed because client is not running identd (or not reachable from the server)"; break; + case (0x5d): message = "request failed because client's identd could not confirm the user ID string in the reques"; break; + default: message = "request rejected for unknown error"; break; @@ -108,4 +107,4 @@ protected override void HandleFaultStatus(byte status) OnException(message); } } -} +} \ No newline at end of file diff --git a/Proxy/Socks5Connector.cs b/Proxy/Socks5Connector.cs index 24ed248..f5ebc60 100644 --- a/Proxy/Socks5Connector.cs +++ b/Proxy/Socks5Connector.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Text; -using SuperSocket.ClientEngine; namespace SuperSocket.ClientEngine.Proxy { @@ -12,7 +10,7 @@ namespace SuperSocket.ClientEngine.Proxy /// public class Socks5Connector : ProxyConnectorBase { - enum SocksState + private enum SocksState { NotAuthenticated, Authenticating, @@ -21,7 +19,7 @@ enum SocksState Connected } - class SocksContext + private class SocksContext { public Socket Socket { get; set; } @@ -42,20 +40,21 @@ class SocksContext public Socks5Connector(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol clientAccessPolicyProtocol) : base(proxyEndPoint, clientAccessPolicyProtocol) { - } #else + public Socks5Connector(EndPoint proxyEndPoint) : base(proxyEndPoint) { - } + #endif #if SILVERLIGHT && !WINDOWS_PHONE public Socks5Connector(EndPoint proxyEndPoint, SocketClientAccessPolicyProtocol clientAccessPolicyProtocol, string username, string password) : base(proxyEndPoint, clientAccessPolicyProtocol) #else + public Socks5Connector(EndPoint proxyEndPoint, string username, string password) : base(proxyEndPoint) #endif @@ -103,7 +102,6 @@ public override void Connect(EndPoint remoteEndPoint) if (!(remoteEndPoint is IPEndPoint || remoteEndPoint is DnsEndPoint)) throw new ArgumentException("remoteEndPoint must be IPEndPoint or DnsEndPoint", "remoteEndPoint"); - try { #if SILVERLIGHT && !WINDOWS_PHONE @@ -265,7 +263,7 @@ protected override void ProcessReceive(SocketAsyncEventArgs e) if (context.ExpectedLength > context.ReceivedData.Count) { - StartReceive(context.Socket,e); + StartReceive(context.Socket, e); return; } else @@ -466,4 +464,4 @@ private void AutheticateWithUserNamePassword(SocketAsyncEventArgs e) StartSend(socket, e); } } -} +} \ No newline at end of file diff --git a/SuperSocket.ClientEngine.NetCore.sln b/SuperSocket.ClientEngine.NetCore.sln index 8374c46..d06e167 100755 --- a/SuperSocket.ClientEngine.NetCore.sln +++ b/SuperSocket.ClientEngine.NetCore.sln @@ -1,13 +1,12 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +VisualStudioVersion = 15.0.27130.2024 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperSocket.ClientEngine", "SuperSocket.ClientEngine\SuperSocket.ClientEngine.csproj", "{982113B9-59EB-4A39-B8CD-0507085E0AF0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SuperSocket.ClientEngine", "SuperSocket.ClientEngine\SuperSocket.ClientEngine.csproj", "{982113B9-59EB-4A39-B8CD-0507085E0AF0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperSocket.ClientEngine.Core", "SuperSocket.ClientEngine.Core\SuperSocket.ClientEngine.Core.csproj", "{D44058D3-B3FF-48E3-AF97-5F3E399E2F25}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SuperSocket.ClientEngine.Core", "SuperSocket.ClientEngine.Core\SuperSocket.ClientEngine.Core.csproj", "{D44058D3-B3FF-48E3-AF97-5F3E399E2F25}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{F80957AA-E61B-47B9-AA0D-4BBF03608EF8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Test\Test.csproj", "{F80957AA-E61B-47B9-AA0D-4BBF03608EF8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -18,45 +17,48 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x64.ActiveCfg = Debug|x64 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x64.Build.0 = Debug|x64 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x86.ActiveCfg = Debug|x86 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x86.Build.0 = Debug|x86 + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x64.ActiveCfg = Debug|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x64.Build.0 = Debug|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x86.ActiveCfg = Debug|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Debug|x86.Build.0 = Debug|Any CPU {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|Any CPU.ActiveCfg = Release|Any CPU {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|Any CPU.Build.0 = Release|Any CPU - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x64.ActiveCfg = Release|x64 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x64.Build.0 = Release|x64 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x86.ActiveCfg = Release|x86 - {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x86.Build.0 = Release|x86 + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x64.ActiveCfg = Release|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x64.Build.0 = Release|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x86.ActiveCfg = Release|Any CPU + {982113B9-59EB-4A39-B8CD-0507085E0AF0}.Release|x86.Build.0 = Release|Any CPU {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x64.ActiveCfg = Debug|x64 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x64.Build.0 = Debug|x64 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x86.ActiveCfg = Debug|x86 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x86.Build.0 = Debug|x86 + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x64.ActiveCfg = Debug|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x64.Build.0 = Debug|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x86.ActiveCfg = Debug|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Debug|x86.Build.0 = Debug|Any CPU {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|Any CPU.ActiveCfg = Release|Any CPU {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|Any CPU.Build.0 = Release|Any CPU - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x64.ActiveCfg = Release|x64 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x64.Build.0 = Release|x64 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x86.ActiveCfg = Release|x86 - {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x86.Build.0 = Release|x86 + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x64.ActiveCfg = Release|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x64.Build.0 = Release|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x86.ActiveCfg = Release|Any CPU + {D44058D3-B3FF-48E3-AF97-5F3E399E2F25}.Release|x86.Build.0 = Release|Any CPU {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x64.ActiveCfg = Debug|x64 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x64.Build.0 = Debug|x64 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x86.ActiveCfg = Debug|x86 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x86.Build.0 = Debug|x86 + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x64.ActiveCfg = Debug|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x64.Build.0 = Debug|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x86.ActiveCfg = Debug|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Debug|x86.Build.0 = Debug|Any CPU {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|Any CPU.Build.0 = Release|Any CPU - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x64.ActiveCfg = Release|x64 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x64.Build.0 = Release|x64 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x86.ActiveCfg = Release|x86 - {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x86.Build.0 = Release|x86 + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x64.ActiveCfg = Release|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x64.Build.0 = Release|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x86.ActiveCfg = Release|Any CPU + {F80957AA-E61B-47B9-AA0D-4BBF03608EF8}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B021ADBA-4955-45DC-8F80-2A77B49C250B} EndGlobalSection EndGlobal