From: JamJar00 Date: Fri, 9 Sep 2016 15:56:07 +0000 (+0100) Subject: Renamed file X-Git-Tag: 1.0.0~143 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=4562b16fa02d045d5cf5af4f7dce95fc049258f8;p=rhonda%2Fimpostor.hazel.git Renamed file --- diff --git a/Hazel/DataEventArgs.cs b/Hazel/DataEventArgs.cs deleted file mode 100644 index ef86cf9..0000000 --- a/Hazel/DataEventArgs.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Hazel -{ - /// - /// Event arguments for the event. - /// - /// - /// - /// This contains information about messages received by a connection and is passed to subscribers of the - /// DataEvent. - /// - /// - /// - /// - public class DataReceivedEventArgs : EventArgs, IRecyclable - { - /// - /// Object pool for this event. - /// - static readonly ObjectPool objectPool = new ObjectPool(() => new DataReceivedEventArgs()); - - /// - /// Returns an instance of this object from the pool. - /// - /// A new or recycled DataEventArgs object. - internal static DataReceivedEventArgs GetObject() - { - return objectPool.GetObject(); - } - - /// - /// The bytes received from the client. - /// - public byte[] Bytes { get; private set; } - - /// - /// The the data was sent with. - /// - public SendOption SendOption { get; private set; } - - /// - /// Private constructor for object pool. - /// - DataReceivedEventArgs() - { - - } - - /// - /// Sets the members of the arguments. - /// - /// The bytes received. - /// The send option used to send the data. - internal void Set(byte[] bytes, SendOption sendOption) - { - this.Bytes = bytes; - this.SendOption = sendOption; - } - - /// - public void Recycle() - { - objectPool.PutObject(this); - } - } -} diff --git a/Hazel/DataReceivedEventArgs.cs b/Hazel/DataReceivedEventArgs.cs new file mode 100644 index 0000000..ef86cf9 --- /dev/null +++ b/Hazel/DataReceivedEventArgs.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Hazel +{ + /// + /// Event arguments for the event. + /// + /// + /// + /// This contains information about messages received by a connection and is passed to subscribers of the + /// DataEvent. + /// + /// + /// + /// + public class DataReceivedEventArgs : EventArgs, IRecyclable + { + /// + /// Object pool for this event. + /// + static readonly ObjectPool objectPool = new ObjectPool(() => new DataReceivedEventArgs()); + + /// + /// Returns an instance of this object from the pool. + /// + /// A new or recycled DataEventArgs object. + internal static DataReceivedEventArgs GetObject() + { + return objectPool.GetObject(); + } + + /// + /// The bytes received from the client. + /// + public byte[] Bytes { get; private set; } + + /// + /// The the data was sent with. + /// + public SendOption SendOption { get; private set; } + + /// + /// Private constructor for object pool. + /// + DataReceivedEventArgs() + { + + } + + /// + /// Sets the members of the arguments. + /// + /// The bytes received. + /// The send option used to send the data. + internal void Set(byte[] bytes, SendOption sendOption) + { + this.Bytes = bytes; + this.SendOption = sendOption; + } + + /// + public void Recycle() + { + objectPool.PutObject(this); + } + } +} diff --git a/Hazel/Hazel.csproj b/Hazel/Hazel.csproj index 2b143af..151a0aa 100644 --- a/Hazel/Hazel.csproj +++ b/Hazel/Hazel.csproj @@ -53,7 +53,7 @@ - +