Skip to content
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

Testing wrap-comment #114

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion AspNetWebStack/src/Common/AttributeList.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections;
using System.Collections.Generic;
Expand Down
3 changes: 2 additions & 1 deletion AspNetWebStack/src/Common/EfficientTypePropertyKey.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

namespace System.Web.Http
{
Expand Down
51 changes: 34 additions & 17 deletions AspNetWebStack/src/Common/Error.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;
using System.ComponentModel;
Expand Down Expand Up @@ -31,7 +32,8 @@ internal static string Format(string format, params object[] args)
/// <summary>
/// Creates an <see cref="ArgumentException"/> with the provided properties.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ArgumentException Argument(
Expand All @@ -46,7 +48,8 @@ params object[] messageArgs
/// Creates an <see cref="ArgumentException"/> with the provided properties.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ArgumentException Argument(
Expand All @@ -59,7 +62,8 @@ params object[] messageArgs
}

/// <summary>
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an "http" or "https" URI.
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an
// "http" or "https" URI.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
Expand All @@ -81,7 +85,8 @@ Uri actualValue
}

/// <summary>
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an absolute URI.
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an
// absolute URI.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
Expand All @@ -98,7 +103,8 @@ Uri actualValue
}

/// <summary>
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an absolute URI
/// Creates an <see cref="ArgumentException"/> with a message saying that the argument must be an
// absolute URI
/// without a query or fragment identifier and then logs it with <see cref="F:TraceLevel.Error"/>.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
Expand Down Expand Up @@ -143,7 +149,8 @@ internal static ArgumentNullException ArgumentNull(string parameterName)
/// Creates an <see cref="ArgumentNullException"/> with the provided properties.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ArgumentNullException ArgumentNull(
Expand Down Expand Up @@ -177,7 +184,8 @@ internal static ArgumentException ArgumentNullOrEmpty(string parameterName)
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ArgumentOutOfRangeException ArgumentOutOfRange(
Expand All @@ -195,7 +203,8 @@ params object[] messageArgs
}

/// <summary>
/// Creates an <see cref="ArgumentOutOfRangeException"/> with a message saying that the argument must be greater than or equal to <paramref name="minValue"/>.
/// Creates an <see cref="ArgumentOutOfRangeException"/> with a message saying that the argument
// must be greater than or equal to <paramref name="minValue"/>.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
Expand All @@ -215,7 +224,8 @@ object minValue
}

/// <summary>
/// Creates an <see cref="ArgumentOutOfRangeException"/> with a message saying that the argument must be less than or equal to <paramref name="maxValue"/>.
/// Creates an <see cref="ArgumentOutOfRangeException"/> with a message saying that the argument
// must be less than or equal to <paramref name="maxValue"/>.
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
Expand Down Expand Up @@ -246,7 +256,8 @@ internal static KeyNotFoundException KeyNotFound()
/// <summary>
/// Creates an <see cref="KeyNotFoundException"/> with a message saying that the key was not found.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static KeyNotFoundException KeyNotFound(
Expand All @@ -260,7 +271,8 @@ params object[] messageArgs
/// <summary>
/// Creates an <see cref="ObjectDisposedException"/> initialized according to guidelines.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ObjectDisposedException ObjectDisposed(
Expand All @@ -284,7 +296,8 @@ internal static OperationCanceledException OperationCanceled()
/// <summary>
/// Creates an <see cref="OperationCanceledException"/> initialized with the provided parameters.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static OperationCanceledException OperationCanceled(
Expand All @@ -300,7 +313,8 @@ params object[] messageArgs
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="invalidValue">The value of the argument that failed.</param>
/// <param name="enumClass">A <see cref="Type"/> that represents the enumeration class with the valid values.</param>
/// <param name="enumClass">A <see cref="Type"/> that represents the enumeration class with the
// valid values.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static ArgumentException InvalidEnumArgument(
string parameterName,
Expand All @@ -314,7 +328,8 @@ Type enumClass
/// <summary>
/// Creates an <see cref="InvalidOperationException"/>.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static InvalidOperationException InvalidOperation(
Expand All @@ -329,7 +344,8 @@ params object[] messageArgs
/// Creates an <see cref="InvalidOperationException"/>.
/// </summary>
/// <param name="innerException">Inner exception</param>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static InvalidOperationException InvalidOperation(
Expand All @@ -347,7 +363,8 @@ params object[] messageArgs
/// <summary>
/// Creates an <see cref="NotSupportedException"/>.
/// </summary>
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageFormat">A composite format string explaining the reason for the
// exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
internal static NotSupportedException NotSupported(
Expand Down
6 changes: 4 additions & 2 deletions AspNetWebStack/src/Common/HttpMethodHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Net.Http;

Expand All @@ -14,7 +15,8 @@ internal static class HttpMethodHelper
/// Gets the static <see cref="HttpMethod"/> instance for any given HTTP method name.
/// </summary>
/// <param name="method">The HTTP request method.</param>
/// <returns>An existing static <see cref="HttpMethod"/> or a new instance if the method was not found.</returns>
/// <returns>An existing static <see cref="HttpMethod"/> or a new instance if the method was not
// found.</returns>
internal static HttpMethod GetHttpMethod(string method)
{
if (String.IsNullOrEmpty(method))
Expand Down
27 changes: 18 additions & 9 deletions AspNetWebStack/src/Common/NonOwnedStream.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Diagnostics.CodeAnalysis;
using System.IO;
Expand All @@ -8,9 +9,11 @@

namespace System.Web.Http
{
/// <summary>Represents a stream that replaces another stream to prevent actually closing that stream.</summary>
/// <summary>Represents a stream that replaces another stream to prevent actually closing that
// stream.</summary>
/// <remarks>
/// This class uses the Decorator [GoF] pattern; it forwards all calls except those related to Dispose and Close.
/// This class uses the Decorator [GoF] pattern; it forwards all calls except those related to
// Dispose and Close.
/// </remarks>
internal class NonOwnedStream : Stream
{
Expand Down Expand Up @@ -113,15 +116,17 @@ public override int ReadTimeout
get
{
// Documentation does not state the behavior when the stream is closed. The NetworkStream
// implementation suggests the contract should be to throw ObjectDisposedException when the stream is
// implementation suggests the contract should be to throw ObjectDisposedException when the stream
// is
// closed.
ThrowIfDisposed();
return InnerStream.ReadTimeout;
}
set
{
// Documentation does not state the behavior when the stream is closed. The NetworkStream
// implementation suggests the contract should be to throw ObjectDisposedException when the stream is
// implementation suggests the contract should be to throw ObjectDisposedException when the stream
// is
// closed.
ThrowIfDisposed();
InnerStream.ReadTimeout = value;
Expand All @@ -133,15 +138,17 @@ public override int WriteTimeout
get
{
// Documentation does not state the behavior when the stream is closed. The NetworkStream
// implementation suggests the contract should be to throw ObjectDisposedException when the stream is
// implementation suggests the contract should be to throw ObjectDisposedException when the stream
// is
// closed.
ThrowIfDisposed();
return InnerStream.WriteTimeout;
}
set
{
// Documentation does not state the behavior when the stream is closed. The NetworkStream
// implementation suggests the contract should be to throw ObjectDisposedException when the stream is
// implementation suggests the contract should be to throw ObjectDisposedException when the stream
// is
// closed.
ThrowIfDisposed();
InnerStream.WriteTimeout = value;
Expand Down Expand Up @@ -175,7 +182,8 @@ object state
public override void Close()
{
// base.Close() calls Dispose(true) and GC.SuppressFinalize(this), which is exactly what we want.
// Note that we do NOT call _innerStream.Close here, as that would actually close the original source
// Note that we do NOT call _innerStream.Close here, as that would actually close the original
// source
// stream, which is the one thing this class is designed to prevent.
base.Close();
}
Expand All @@ -201,7 +209,8 @@ CancellationToken cancellationToken
)]
protected override void Dispose(bool disposing)
{
// Note that we do NOT call _innerStream.Dispose or Close here, as that would actually close the original
// Note that we do NOT call _innerStream.Dispose or Close here, as that would actually close the
// original
// source stream, which is the one thing this class is designed to prevent.

if (!IsDisposed)
Expand Down
12 changes: 8 additions & 4 deletions AspNetWebStack/src/Common/PrefixContainer.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;

namespace System.Web
{
/// <summary>
/// This is a container for prefix values. It normalizes all the values into dotted-form and then stores
/// them in a sorted array. All queries for prefixes are also normalized to dotted-form, and searches
/// This is a container for prefix values. It normalizes all the values into dotted-form and then
// stores
/// them in a sorted array. All queries for prefixes are also normalized to dotted-form, and
// searches
/// for ContainsPrefix are done with a binary search.
/// </summary>
internal class PrefixContainer
Expand Down Expand Up @@ -55,7 +58,8 @@ internal bool ContainsPrefix(string prefix)
return containsPrefix;
}

// Given "foo.bar", "foo.hello", "something.other", foo[abc].baz and asking for prefix "foo" will return:
// Given "foo.bar", "foo.hello", "something.other", foo[abc].baz and asking for prefix "foo" will
// return:
// - "bar"/"foo.bar"
// - "hello"/"foo.hello"
// - "abc"/"foo[abc]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;
using System.Globalization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;
using System.Globalization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;
using System.Globalization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license
// information.

using System.Collections.Generic;
using System.Globalization;
Expand Down
Loading