Skip to content

Pull from origin repo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 72 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
fc90a9e
[Modify] Polish it
sta Nov 24, 2019
13a20f4
[Modify] Edit it
sta Nov 25, 2019
50084de
[Modify] Polish it
sta Nov 26, 2019
7891e1f
[Modify] Edit it
sta Nov 27, 2019
2636a9f
[Modify] Add it
sta Nov 28, 2019
d75c107
[Modify] Rename it
sta Nov 29, 2019
2039891
[Modify] Replace it
sta Nov 30, 2019
7ca0f85
[Modify] Polish it
sta Dec 1, 2019
ff03375
[Modify] Polish it
sta Dec 2, 2019
8492a0b
[Modify] Polish it
sta Dec 2, 2019
815f94b
[Modify] Polish it
sta Dec 3, 2019
2be71f3
[Modify] Polish it
sta Dec 4, 2019
aaf8ea5
[Modify] Polish it
sta Dec 5, 2019
bd778b4
[Modify] Polish it
sta Dec 6, 2019
835820f
[Modify] Polish it
sta Dec 7, 2019
e56891e
[Modify] Use Encoding.UTF8
sta Dec 8, 2019
6726e04
[Modify] Add it
sta Dec 9, 2019
cff6565
[Modify] Add it
sta Dec 10, 2019
4af6021
[Modify] Replace it
sta Dec 11, 2019
becf1e5
[Modify] Remove it
sta Dec 12, 2019
8b39685
[Modify] Rename it
sta Dec 13, 2019
bfa4e21
[Modify] Edit it
sta Dec 14, 2019
92b2bcb
[Modify] Edit it
sta Dec 15, 2019
77374c3
[Modify] Throw an exception
sta Dec 16, 2019
60b6f04
[Modify] Edit it
sta Dec 16, 2019
7e38b36
[Modify] Edit it
sta Dec 17, 2019
0c39408
[Modify] Edit it
sta Dec 17, 2019
fffe325
[Modify] Throw an exception
sta Dec 18, 2019
8134553
[Modify] Edit it
sta Dec 18, 2019
7fa9e62
[Modify] Edit it
sta Dec 19, 2019
197166b
[Modify] Edit it
sta Dec 20, 2019
889e6d3
[Modify] Throw an exception
sta Dec 21, 2019
2be0c4c
[Modify] Edit it
sta Dec 21, 2019
dcbc93a
[Modify] Replace it
sta Dec 22, 2019
90faa41
[Modify] Edit it
sta Dec 22, 2019
794c218
[Modify] Replace it
sta Dec 23, 2019
a568bec
[Modify] Edit it
sta Dec 23, 2019
f9e3738
[Modify] Edit it
sta Dec 23, 2019
8064569
[Modify] Use the Uri class
sta Dec 24, 2019
dfa8c0b
[Modify] Rename it
sta Dec 25, 2019
7df1ec1
[Modify] Edit it
sta Dec 26, 2019
5ca13f5
[Modify] Edit it
sta Dec 27, 2019
0862ed7
[Modify] Polish it
sta Dec 28, 2019
44129b0
[Modify] Polish it
sta Dec 28, 2019
9d16481
[Modify] To internal
sta Dec 29, 2019
6493f90
[Modify] To internal
sta Dec 30, 2019
93db5db
[Modify] Edit it
sta Dec 31, 2019
21cb8a0
[Modify] Add it
sta Jan 1, 2020
5906749
[Modify] 2020
sta Jan 1, 2020
74fdd0e
[Modify] Replace it
sta Jan 2, 2020
18f77fa
[Modify] Throw an exception
sta Jan 3, 2020
4f23657
[Modify] Edit it
sta Jan 4, 2020
73aef37
[Modify] Polish it
sta Jan 5, 2020
144e78b
[Modify] Polish it
sta Jan 6, 2020
c1ae944
[Modify] Polish it
sta Jan 7, 2020
90e935f
[Modify] Polish it
sta Jan 7, 2020
897a99e
[Modify] Edit it
sta Jan 8, 2020
82265ca
[Modify] Add it
sta Jan 9, 2020
759c5f6
[Modify] Replace it
sta Jan 9, 2020
c8f022f
[Modify] Polish it
sta Jan 10, 2020
a5e9b0c
[Modify] Polish it
sta Jan 10, 2020
f0aa1ed
[Modify] Polish it
sta Jan 11, 2020
bfbc8ec
[Modify] Polish it
sta Jan 12, 2020
ef2d7ac
[Modify] Polish it
sta Jan 12, 2020
7284b6f
[Modify] Polish it
sta Jan 13, 2020
5ddf6b4
[Modify] Polish it
sta Jan 13, 2020
448231e
[Modify] Polish it
sta Jan 14, 2020
fcbff44
[Modify] Polish it
sta Jan 14, 2020
a93c894
[Modify] Add it
sta Jan 15, 2020
a1e56b5
[Modify] Replace it
sta Jan 15, 2020
14b0c2f
[Modify] Remove it
sta Jan 16, 2020
a3b4080
[Modify] Polish it
sta Jan 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2010-2019 sta.blockhead
Copyright (c) 2010-2020 sta.blockhead

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
87 changes: 39 additions & 48 deletions websocket-sharp/Ext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,27 @@ internal static byte[] DecompressToArray (this Stream stream, CompressionMethod
: stream.ToByteArray ();
}

internal static void Emit (
this EventHandler eventHandler, object sender, EventArgs e
)
{
if (eventHandler == null)
return;

eventHandler (sender, e);
}

internal static void Emit<TEventArgs> (
this EventHandler<TEventArgs> eventHandler, object sender, TEventArgs e
)
where TEventArgs : EventArgs
{
if (eventHandler == null)
return;

eventHandler (sender, e);
}

/// <summary>
/// Determines whether the specified <see cref="int"/> equals the specified <see cref="char"/>,
/// and invokes the specified <c>Action&lt;int&gt;</c> delegate at the same time.
Expand Down Expand Up @@ -1279,69 +1300,39 @@ Action<Exception> error
#region Public Methods

/// <summary>
/// Emits the specified <see cref="EventHandler"/> delegate if it isn't <see langword="null"/>.
/// </summary>
/// <param name="eventHandler">
/// A <see cref="EventHandler"/> to emit.
/// </param>
/// <param name="sender">
/// An <see cref="object"/> from which emits this <paramref name="eventHandler"/>.
/// </param>
/// <param name="e">
/// A <see cref="EventArgs"/> that contains no event data.
/// </param>
public static void Emit (this EventHandler eventHandler, object sender, EventArgs e)
{
if (eventHandler != null)
eventHandler (sender, e);
}

/// <summary>
/// Emits the specified <c>EventHandler&lt;TEventArgs&gt;</c> delegate if it isn't
/// <see langword="null"/>.
/// </summary>
/// <param name="eventHandler">
/// An <c>EventHandler&lt;TEventArgs&gt;</c> to emit.
/// </param>
/// <param name="sender">
/// An <see cref="object"/> from which emits this <paramref name="eventHandler"/>.
/// </param>
/// <param name="e">
/// A <c>TEventArgs</c> that represents the event data.
/// </param>
/// <typeparam name="TEventArgs">
/// The type of the event data generated by the event.
/// </typeparam>
public static void Emit<TEventArgs> (
this EventHandler<TEventArgs> eventHandler, object sender, TEventArgs e)
where TEventArgs : EventArgs
{
if (eventHandler != null)
eventHandler (sender, e);
}

/// <summary>
/// Gets the description of the specified HTTP status <paramref name="code"/>.
/// Gets the description of the specified HTTP status code.
/// </summary>
/// <returns>
/// A <see cref="string"/> that represents the description of the HTTP status code.
/// A <see cref="string"/> that represents the description of
/// the HTTP status code.
/// </returns>
/// <param name="code">
/// One of <see cref="HttpStatusCode"/> enum values, indicates the HTTP status code.
/// <para>
/// One of the <see cref="HttpStatusCode"/> enum values.
/// </para>
/// <para>
/// It specifies the HTTP status code.
/// </para>
/// </param>
public static string GetDescription (this HttpStatusCode code)
{
return ((int) code).GetStatusDescription ();
}

/// <summary>
/// Gets the description of the specified HTTP status <paramref name="code"/>.
/// Gets the description of the specified HTTP status code.
/// </summary>
/// <returns>
/// A <see cref="string"/> that represents the description of the HTTP status code.
/// <para>
/// A <see cref="string"/> that represents the description of
/// the HTTP status code.
/// </para>
/// <para>
/// An empty string if the description is not present.
/// </para>
/// </returns>
/// <param name="code">
/// An <see cref="int"/> that represents the HTTP status code.
/// An <see cref="int"/> that specifies the HTTP status code.
/// </param>
public static string GetStatusDescription (this int code)
{
Expand Down
Loading