From: JamJar00 Date: Fri, 12 May 2017 12:51:57 +0000 (+0100) Subject: Fixed build by moving DocInclude folder to documentation project X-Git-Tag: 1.0.0~103 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=b676fd73b0a0bcc4e83f902f30d0e20f78824de1;p=rhonda%2Fimpostor.hazel.git Fixed build by moving DocInclude folder to documentation project --- diff --git a/Hazel.Documentation/Content Layout.content b/Hazel.Documentation/Content Layout.content new file mode 100644 index 0000000..e69b068 --- /dev/null +++ b/Hazel.Documentation/Content Layout.content @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Hazel.Documentation/Content/Content Layout.content b/Hazel.Documentation/Content/Content Layout.content deleted file mode 100644 index e69b068..0000000 --- a/Hazel.Documentation/Content/Content Layout.content +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Hazel.Documentation/Content/DocInclude/TcpClientExample.cs b/Hazel.Documentation/Content/DocInclude/TcpClientExample.cs deleted file mode 100644 index 8138f6b..0000000 --- a/Hazel.Documentation/Content/DocInclude/TcpClientExample.cs +++ /dev/null @@ -1,24 +0,0 @@ -class TcpClientExample -{ - static void Main(string[] args) - { - using (TcpConnection connection = new TcpConnection()) - { - ManualResetEvent e = new ManualResetEvent(false); - - //Whenever we receive data print the number of bytes and how it was sent - connection.DataReceived += (object sender, DataReceivedEventArgs a) => - Console.WriteLine("Received {0} bytes via {1}!", a.Bytes.Length, a.SendOption); - - //When the end point disconnects from us then release the main thread and exit - connection.Disconnected += (object sender, DisconnectedEventArgs a) => - e.Set(); - - //Connect to a server - connection.Connect(new NetworkEndPoint("127.0.0.1", 4296)); - - //Wait until the end point disconnects from us - e.WaitOne(); - } - } -} diff --git a/Hazel.Documentation/Content/DocInclude/TcpListenerExample.cs b/Hazel.Documentation/Content/DocInclude/TcpListenerExample.cs deleted file mode 100644 index 468452b..0000000 --- a/Hazel.Documentation/Content/DocInclude/TcpListenerExample.cs +++ /dev/null @@ -1,23 +0,0 @@ -class TcpListenerExample -{ - static void Main(string[] args) - { - //Setup listener - using (TcpConnectionListener listener = new TcpConnectionListener(new NetworkEndPoint(IPAddress.Any, 4296))) - { - //Start listening for new connection events - listener.NewConnection += delegate(object sender, NewConnectionEventArgs a) - { - //Send the client some data - a.Connection.SendBytes(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, SendOption.Reliable); - - //Disconnect from the client - a.Connection.Close(); - }; - - listener.Start(); - - Console.ReadKey(); - } - } -} diff --git a/Hazel.Documentation/Content/DocInclude/UdpClientExample.cs b/Hazel.Documentation/Content/DocInclude/UdpClientExample.cs deleted file mode 100644 index e77d5c5..0000000 --- a/Hazel.Documentation/Content/DocInclude/UdpClientExample.cs +++ /dev/null @@ -1,24 +0,0 @@ -class UdpClientExample -{ - static void Main(string[] args) - { - using (UdpConnection connection = new UdpConnection()) - { - ManualResetEvent e = new ManualResetEvent(false); - - //Whenever we receive data print the number of bytes and how it was sent - connection.DataReceived += (object sender, DataReceivedEventArgs a) => - Console.WriteLine("Received {0} bytes via {1}!", a.Bytes.Length, a.SendOption); - - //When the end point disconnects from us then release the main thread and exit - connection.Disconnected += (object sender, DisconnectedEventArgs a) => - e.Set(); - - //Connect to a server - connection.Connect(new NetworkEndPoint("127.0.0.1", 4296)); - - //Wait until the end point disconnects from us - e.WaitOne(); - } - } -} diff --git a/Hazel.Documentation/Content/DocInclude/UdpListenerExample.cs b/Hazel.Documentation/Content/DocInclude/UdpListenerExample.cs deleted file mode 100644 index 4c26c49..0000000 --- a/Hazel.Documentation/Content/DocInclude/UdpListenerExample.cs +++ /dev/null @@ -1,23 +0,0 @@ -class UdpListenerExample -{ - static void Main(string[] args) - { - //Setup listener - using (UdpConnectionListener listener = new UdpConnectionListener(new NetworkEndPoint(IPAddress.Any, 4296))) - { - //Start listening for new connection events - listener.NewConnection += delegate(object sender, NewConnectionEventArgs a) - { - //Send the client some data - a.Connection.SendBytes(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, SendOption.Reliable); - - //Disconnect from the client - a.Connection.Close(); - }; - - listener.Start(); - - Console.ReadKey(); - } - } -} diff --git a/Hazel.Documentation/Content/DocInclude/common.xml b/Hazel.Documentation/Content/DocInclude/common.xml deleted file mode 100644 index 5e9ab9e..0000000 --- a/Hazel.Documentation/Content/DocInclude/common.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - As with all Hazel events it is invoked on a thread from the .NET - ThreadPool and hence any subscribers should ensure their - handling code is thread safe. Implementing connections are not bound to invoking this event in the sequence - messages are received, in fact implementers are only required to ensure this method is always and only invoked - for a user sent message, therefore subscribers should be aware that this event may be called out of order and - may be called whilst another thread is still handling an invocation of the event. - - - - - This object implements IRecyclable and hence can be recycled in order to reduce the number of objects the - GC has to deal with. When you are done with the object you can either leave it unreferenced as you usually - would and the GC will collect it or you can call to inform Hazel that the object - should be reused. Once recycle has been called the contents can be overwritten at any time and so only - call it once you are completely finished with the object. - - - - - This method sends a number of bytes in a message to the end point of this client using the given - to describe how the data should be sent. Sending messages requires that the - this connection is connected to a remote end point and SendBytes will throw an exception if that is not - the case. See the property for information on whether a connection is connected or not. - - - \ No newline at end of file diff --git a/Hazel.Documentation/ContentLayout.content b/Hazel.Documentation/ContentLayout.content deleted file mode 100644 index 500dd8f..0000000 --- a/Hazel.Documentation/ContentLayout.content +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Hazel.Documentation/Hazel.Documentation.shfbproj b/Hazel.Documentation/Hazel.Documentation.shfbproj index 9059a57..2ba3113 100644 --- a/Hazel.Documentation/Hazel.Documentation.shfbproj +++ b/Hazel.Documentation/Hazel.Documentation.shfbproj @@ -50,18 +50,13 @@ - + - - - - - @@ -69,10 +64,14 @@ + + + + + - - + diff --git a/Hazel.Documentation/docinclude/TcpClientExample.cs b/Hazel.Documentation/docinclude/TcpClientExample.cs new file mode 100644 index 0000000..8138f6b --- /dev/null +++ b/Hazel.Documentation/docinclude/TcpClientExample.cs @@ -0,0 +1,24 @@ +class TcpClientExample +{ + static void Main(string[] args) + { + using (TcpConnection connection = new TcpConnection()) + { + ManualResetEvent e = new ManualResetEvent(false); + + //Whenever we receive data print the number of bytes and how it was sent + connection.DataReceived += (object sender, DataReceivedEventArgs a) => + Console.WriteLine("Received {0} bytes via {1}!", a.Bytes.Length, a.SendOption); + + //When the end point disconnects from us then release the main thread and exit + connection.Disconnected += (object sender, DisconnectedEventArgs a) => + e.Set(); + + //Connect to a server + connection.Connect(new NetworkEndPoint("127.0.0.1", 4296)); + + //Wait until the end point disconnects from us + e.WaitOne(); + } + } +} diff --git a/Hazel.Documentation/docinclude/TcpListenerExample.cs b/Hazel.Documentation/docinclude/TcpListenerExample.cs new file mode 100644 index 0000000..468452b --- /dev/null +++ b/Hazel.Documentation/docinclude/TcpListenerExample.cs @@ -0,0 +1,23 @@ +class TcpListenerExample +{ + static void Main(string[] args) + { + //Setup listener + using (TcpConnectionListener listener = new TcpConnectionListener(new NetworkEndPoint(IPAddress.Any, 4296))) + { + //Start listening for new connection events + listener.NewConnection += delegate(object sender, NewConnectionEventArgs a) + { + //Send the client some data + a.Connection.SendBytes(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, SendOption.Reliable); + + //Disconnect from the client + a.Connection.Close(); + }; + + listener.Start(); + + Console.ReadKey(); + } + } +} diff --git a/Hazel.Documentation/docinclude/UdpClientExample.cs b/Hazel.Documentation/docinclude/UdpClientExample.cs new file mode 100644 index 0000000..e77d5c5 --- /dev/null +++ b/Hazel.Documentation/docinclude/UdpClientExample.cs @@ -0,0 +1,24 @@ +class UdpClientExample +{ + static void Main(string[] args) + { + using (UdpConnection connection = new UdpConnection()) + { + ManualResetEvent e = new ManualResetEvent(false); + + //Whenever we receive data print the number of bytes and how it was sent + connection.DataReceived += (object sender, DataReceivedEventArgs a) => + Console.WriteLine("Received {0} bytes via {1}!", a.Bytes.Length, a.SendOption); + + //When the end point disconnects from us then release the main thread and exit + connection.Disconnected += (object sender, DisconnectedEventArgs a) => + e.Set(); + + //Connect to a server + connection.Connect(new NetworkEndPoint("127.0.0.1", 4296)); + + //Wait until the end point disconnects from us + e.WaitOne(); + } + } +} diff --git a/Hazel.Documentation/docinclude/UdpListenerExample.cs b/Hazel.Documentation/docinclude/UdpListenerExample.cs new file mode 100644 index 0000000..4c26c49 --- /dev/null +++ b/Hazel.Documentation/docinclude/UdpListenerExample.cs @@ -0,0 +1,23 @@ +class UdpListenerExample +{ + static void Main(string[] args) + { + //Setup listener + using (UdpConnectionListener listener = new UdpConnectionListener(new NetworkEndPoint(IPAddress.Any, 4296))) + { + //Start listening for new connection events + listener.NewConnection += delegate(object sender, NewConnectionEventArgs a) + { + //Send the client some data + a.Connection.SendBytes(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }, SendOption.Reliable); + + //Disconnect from the client + a.Connection.Close(); + }; + + listener.Start(); + + Console.ReadKey(); + } + } +} diff --git a/Hazel.Documentation/docinclude/common.xml b/Hazel.Documentation/docinclude/common.xml new file mode 100644 index 0000000..5e9ab9e --- /dev/null +++ b/Hazel.Documentation/docinclude/common.xml @@ -0,0 +1,31 @@ + + + + + + As with all Hazel events it is invoked on a thread from the .NET + ThreadPool and hence any subscribers should ensure their + handling code is thread safe. Implementing connections are not bound to invoking this event in the sequence + messages are received, in fact implementers are only required to ensure this method is always and only invoked + for a user sent message, therefore subscribers should be aware that this event may be called out of order and + may be called whilst another thread is still handling an invocation of the event. + + + + + This object implements IRecyclable and hence can be recycled in order to reduce the number of objects the + GC has to deal with. When you are done with the object you can either leave it unreferenced as you usually + would and the GC will collect it or you can call to inform Hazel that the object + should be reused. Once recycle has been called the contents can be overwritten at any time and so only + call it once you are completely finished with the object. + + + + + This method sends a number of bytes in a message to the end point of this client using the given + to describe how the data should be sent. Sending messages requires that the + this connection is connected to a remote end point and SendBytes will throw an exception if that is not + the case. See the property for information on whether a connection is connected or not. + + + \ No newline at end of file diff --git a/Hazel/Connection.cs b/Hazel/Connection.cs index 45058c1..7bc9d57 100644 --- a/Hazel/Connection.cs +++ b/Hazel/Connection.cs @@ -46,7 +46,7 @@ namespace Hazel /// /// /// - /// + /// /// public event EventHandler DataReceived; @@ -62,7 +62,7 @@ namespace Hazel /// /// /// - /// + /// /// public event EventHandler Disconnected; diff --git a/Hazel/ConnectionListener.cs b/Hazel/ConnectionListener.cs index 88d061a..b12309e 100644 --- a/Hazel/ConnectionListener.cs +++ b/Hazel/ConnectionListener.cs @@ -44,7 +44,7 @@ namespace Hazel /// /// /// - /// + /// /// public event EventHandler NewConnection; @@ -61,7 +61,7 @@ namespace Hazel /// /// /// - /// + /// /// public abstract void Start(); diff --git a/Hazel/Hazel.csproj b/Hazel/Hazel.csproj index f382241..5cf54e2 100644 --- a/Hazel/Hazel.csproj +++ b/Hazel/Hazel.csproj @@ -55,10 +55,6 @@ - - - - @@ -84,11 +80,6 @@ - - - Designer - -