@@ -389,6 +389,27 @@ internal static byte[] DecompressToArray (this Stream stream, CompressionMethod
389
389
: stream . ToByteArray ( ) ;
390
390
}
391
391
392
+ internal static void Emit (
393
+ this EventHandler eventHandler , object sender , EventArgs e
394
+ )
395
+ {
396
+ if ( eventHandler == null )
397
+ return ;
398
+
399
+ eventHandler ( sender , e ) ;
400
+ }
401
+
402
+ internal static void Emit < TEventArgs > (
403
+ this EventHandler < TEventArgs > eventHandler , object sender , TEventArgs e
404
+ )
405
+ where TEventArgs : EventArgs
406
+ {
407
+ if ( eventHandler == null )
408
+ return ;
409
+
410
+ eventHandler ( sender , e ) ;
411
+ }
412
+
392
413
/// <summary>
393
414
/// Determines whether the specified <see cref="int"/> equals the specified <see cref="char"/>,
394
415
/// and invokes the specified <c>Action<int></c> delegate at the same time.
@@ -1279,69 +1300,39 @@ Action<Exception> error
1279
1300
#region Public Methods
1280
1301
1281
1302
/// <summary>
1282
- /// Emits the specified <see cref="EventHandler"/> delegate if it isn't <see langword="null"/>.
1283
- /// </summary>
1284
- /// <param name="eventHandler">
1285
- /// A <see cref="EventHandler"/> to emit.
1286
- /// </param>
1287
- /// <param name="sender">
1288
- /// An <see cref="object"/> from which emits this <paramref name="eventHandler"/>.
1289
- /// </param>
1290
- /// <param name="e">
1291
- /// A <see cref="EventArgs"/> that contains no event data.
1292
- /// </param>
1293
- public static void Emit ( this EventHandler eventHandler , object sender , EventArgs e )
1294
- {
1295
- if ( eventHandler != null )
1296
- eventHandler ( sender , e ) ;
1297
- }
1298
-
1299
- /// <summary>
1300
- /// Emits the specified <c>EventHandler<TEventArgs></c> delegate if it isn't
1301
- /// <see langword="null"/>.
1302
- /// </summary>
1303
- /// <param name="eventHandler">
1304
- /// An <c>EventHandler<TEventArgs></c> to emit.
1305
- /// </param>
1306
- /// <param name="sender">
1307
- /// An <see cref="object"/> from which emits this <paramref name="eventHandler"/>.
1308
- /// </param>
1309
- /// <param name="e">
1310
- /// A <c>TEventArgs</c> that represents the event data.
1311
- /// </param>
1312
- /// <typeparam name="TEventArgs">
1313
- /// The type of the event data generated by the event.
1314
- /// </typeparam>
1315
- public static void Emit < TEventArgs > (
1316
- this EventHandler < TEventArgs > eventHandler , object sender , TEventArgs e )
1317
- where TEventArgs : EventArgs
1318
- {
1319
- if ( eventHandler != null )
1320
- eventHandler ( sender , e ) ;
1321
- }
1322
-
1323
- /// <summary>
1324
- /// Gets the description of the specified HTTP status <paramref name="code"/>.
1303
+ /// Gets the description of the specified HTTP status code.
1325
1304
/// </summary>
1326
1305
/// <returns>
1327
- /// A <see cref="string"/> that represents the description of the HTTP status code.
1306
+ /// A <see cref="string"/> that represents the description of
1307
+ /// the HTTP status code.
1328
1308
/// </returns>
1329
1309
/// <param name="code">
1330
- /// One of <see cref="HttpStatusCode"/> enum values, indicates the HTTP status code.
1310
+ /// <para>
1311
+ /// One of the <see cref="HttpStatusCode"/> enum values.
1312
+ /// </para>
1313
+ /// <para>
1314
+ /// It specifies the HTTP status code.
1315
+ /// </para>
1331
1316
/// </param>
1332
1317
public static string GetDescription ( this HttpStatusCode code )
1333
1318
{
1334
1319
return ( ( int ) code ) . GetStatusDescription ( ) ;
1335
1320
}
1336
1321
1337
1322
/// <summary>
1338
- /// Gets the description of the specified HTTP status <paramref name=" code"/> .
1323
+ /// Gets the description of the specified HTTP status code.
1339
1324
/// </summary>
1340
1325
/// <returns>
1341
- /// A <see cref="string"/> that represents the description of the HTTP status code.
1326
+ /// <para>
1327
+ /// A <see cref="string"/> that represents the description of
1328
+ /// the HTTP status code.
1329
+ /// </para>
1330
+ /// <para>
1331
+ /// An empty string if the description is not present.
1332
+ /// </para>
1342
1333
/// </returns>
1343
1334
/// <param name="code">
1344
- /// An <see cref="int"/> that represents the HTTP status code.
1335
+ /// An <see cref="int"/> that specifies the HTTP status code.
1345
1336
/// </param>
1346
1337
public static string GetStatusDescription ( this int code )
1347
1338
{
0 commit comments