diff --git a/src/Microsoft.AspNet.Routing/Constraints/BoolRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/BoolRouteConstraint.cs index cc8eb6c967..d030f2ee76 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/BoolRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/BoolRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class BoolRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/CompositeRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/CompositeRouteConstraint.cs index bfe5e2e216..38565ba769 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/CompositeRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/CompositeRouteConstraint.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Routing public IEnumerable Constraints { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/DateTimeRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/DateTimeRouteConstraint.cs index f8c5e656f0..5181e1980f 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/DateTimeRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/DateTimeRouteConstraint.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Routing.Constraints /// Constrains a route parameter to represent only values. /// /// - /// This constraint tries to parse strings by using all of the formats returned by the + /// This constraint tries to parse strings by using all of the formats returned by the /// CultureInfo.InvariantCulture.DateTimeFormat.GetAllDateTimePatterns() method. /// For a sample on how to list all formats which are considered, please visit /// http://msdn.microsoft.com/en-us/library/aszyst2c(v=vs.110).aspx @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class DateTimeRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/DecimalRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/DecimalRouteConstraint.cs index 45382ed9dc..3c44de4cdf 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/DecimalRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/DecimalRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class DecimalRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/DoubleRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/DoubleRouteConstraint.cs index 90e53666ea..b2e3354423 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/DoubleRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/DoubleRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class DoubleRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/FloatRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/FloatRouteConstraint.cs index 276995c752..b6067fb9e8 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/FloatRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/FloatRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class FloatRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/GuidRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/GuidRouteConstraint.cs index d6bb7e6c8d..174a10e158 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/GuidRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/GuidRouteConstraint.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class GuidRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/IntRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/IntRouteConstraint.cs index 6532ef1082..c3e6fa4b86 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/IntRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/IntRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class IntRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/LengthRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/LengthRouteConstraint.cs index 1d41153d0b..f3be0255a2 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/LengthRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/LengthRouteConstraint.cs @@ -51,7 +51,7 @@ namespace Microsoft.AspNet.Routing.Constraints if (minLength > maxLength) { - var errorMessage = + var errorMessage = Resources.FormatRangeConstraint_MinShouldBeLessThanOrEqualToMax("minLength", "maxLength"); throw new ArgumentOutOfRangeException("minLength", minLength, errorMessage); } @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Routing.Constraints public int MaxLength { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/LongRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/LongRouteConstraint.cs index 7a357921df..5be25f56f4 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/LongRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/LongRouteConstraint.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Routing.Constraints public class LongRouteConstraint : IRouteConstraint { /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/MaxLengthRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/MaxLengthRouteConstraint.cs index e0e9dd81f5..1a55192091 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/MaxLengthRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/MaxLengthRouteConstraint.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Routing.Constraints public int MaxLength { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/MaxRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/MaxRouteConstraint.cs index 0100a81808..cd98988f8f 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/MaxRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/MaxRouteConstraint.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNet.Routing.Constraints public long Max { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/MinLengthRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/MinLengthRouteConstraint.cs index b729af9f05..fd7c6504c3 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/MinLengthRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/MinLengthRouteConstraint.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Routing.Constraints public int MinLength { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/MinRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/MinRouteConstraint.cs index cc387cafb1..7140a58a58 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/MinRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/MinRouteConstraint.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNet.Routing.Constraints public long Min { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/RangeRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/RangeRouteConstraint.cs index e5cda4c8d0..2b5681e071 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/RangeRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/RangeRouteConstraint.cs @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Routing.Constraints public long Max { get; private set; } /// - public bool Match([NotNull] HttpContext httpContext, + public bool Match([NotNull] HttpContext httpContext, [NotNull] IRouter route, [NotNull] string routeKey, [NotNull] IDictionary values, diff --git a/src/Microsoft.AspNet.Routing/Constraints/RequiredRouteConstraint.cs b/src/Microsoft.AspNet.Routing/Constraints/RequiredRouteConstraint.cs index 899470b4dc..a4085fb638 100644 --- a/src/Microsoft.AspNet.Routing/Constraints/RequiredRouteConstraint.cs +++ b/src/Microsoft.AspNet.Routing/Constraints/RequiredRouteConstraint.cs @@ -12,17 +12,17 @@ namespace Microsoft.AspNet.Routing.Constraints /// Constraints a route parameter that must have a value. /// /// - /// This constraint is primarily used to enforce that a non-parameter value is present during + /// This constraint is primarily used to enforce that a non-parameter value is present during /// URL generation. /// public class RequiredRouteConstraint : IRouteConstraint { /// public bool Match( - [NotNull]HttpContext httpContext, - [NotNull]IRouter route, - [NotNull]string routeKey, - [NotNull]IDictionary values, + [NotNull]HttpContext httpContext, + [NotNull]IRouter route, + [NotNull]string routeKey, + [NotNull]IDictionary values, RouteDirection routeDirection) { object value; diff --git a/src/Microsoft.AspNet.Routing/InlineRouteParameterParser.cs b/src/Microsoft.AspNet.Routing/InlineRouteParameterParser.cs index 193befa746..2ba992e5b5 100644 --- a/src/Microsoft.AspNet.Routing/InlineRouteParameterParser.cs +++ b/src/Microsoft.AspNet.Routing/InlineRouteParameterParser.cs @@ -47,7 +47,7 @@ namespace Microsoft.AspNet.Routing } var parameterName = parameterMatch.Groups["parameterName"].Value; - + // Add the default value if present var defaultValueGroup = parameterMatch.Groups["defaultValue"]; var defaultValue = GetDefaultValue(defaultValueGroup); @@ -55,12 +55,12 @@ namespace Microsoft.AspNet.Routing // Register inline constraints if present var constraintGroup = parameterMatch.Groups["constraint"]; var inlineConstraints = GetInlineConstraints(constraintGroup); - + return TemplatePart.CreateParameter(parameterName, isCatchAll, isOptional, defaultValue, - inlineConstraints); + inlineConstraints); } private static string GetDefaultValue(Group defaultValueGroup) diff --git a/src/Microsoft.AspNet.Routing/Logging/LogFormatter.cs b/src/Microsoft.AspNet.Routing/Logging/LogFormatter.cs index 4d74041a36..3e6ae53876 100644 --- a/src/Microsoft.AspNet.Routing/Logging/LogFormatter.cs +++ b/src/Microsoft.AspNet.Routing/Logging/LogFormatter.cs @@ -9,9 +9,9 @@ namespace Microsoft.AspNet.Routing.Logging.Internal { /// /// A formatter for use with . /// public static string Formatter(object o, Exception e) diff --git a/src/Microsoft.AspNet.Routing/Logging/RouteCollectionRouteAsyncValues.cs b/src/Microsoft.AspNet.Routing/Logging/RouteCollectionRouteAsyncValues.cs index f8303bb91a..da34078676 100644 --- a/src/Microsoft.AspNet.Routing/Logging/RouteCollectionRouteAsyncValues.cs +++ b/src/Microsoft.AspNet.Routing/Logging/RouteCollectionRouteAsyncValues.cs @@ -7,7 +7,7 @@ using System.Text; namespace Microsoft.AspNet.Routing.Logging { /// - /// Describes the state of + /// Describes the state of /// . /// public class RouteCollectionRouteAsyncValues diff --git a/src/Microsoft.AspNet.Routing/Logging/RouteConstraintMatcherMatchValues.cs b/src/Microsoft.AspNet.Routing/Logging/RouteConstraintMatcherMatchValues.cs index 4f6272eb70..de52061715 100644 --- a/src/Microsoft.AspNet.Routing/Logging/RouteConstraintMatcherMatchValues.cs +++ b/src/Microsoft.AspNet.Routing/Logging/RouteConstraintMatcherMatchValues.cs @@ -7,11 +7,11 @@ namespace Microsoft.AspNet.Routing.Logging { /// /// Describes the state of . /// public class RouteConstraintMatcherMatchValues diff --git a/src/Microsoft.AspNet.Routing/Logging/RouterMiddlewareInvokeValues.cs b/src/Microsoft.AspNet.Routing/Logging/RouterMiddlewareInvokeValues.cs index 7a474b1a9d..d99b834f33 100644 --- a/src/Microsoft.AspNet.Routing/Logging/RouterMiddlewareInvokeValues.cs +++ b/src/Microsoft.AspNet.Routing/Logging/RouterMiddlewareInvokeValues.cs @@ -6,7 +6,7 @@ using System.Text; namespace Microsoft.AspNet.Routing.Logging { /// - /// Describes the state of + /// Describes the state of /// . /// public class RouterMiddlewareInvokeValues diff --git a/src/Microsoft.AspNet.Routing/Logging/TemplateRouteRouteAsyncValues.cs b/src/Microsoft.AspNet.Routing/Logging/TemplateRouteRouteAsyncValues.cs index 98a21fd16d..18f83c6bdb 100644 --- a/src/Microsoft.AspNet.Routing/Logging/TemplateRouteRouteAsyncValues.cs +++ b/src/Microsoft.AspNet.Routing/Logging/TemplateRouteRouteAsyncValues.cs @@ -7,7 +7,7 @@ using System.Text; namespace Microsoft.AspNet.Routing.Logging { /// - /// Describes the state of + /// Describes the state of /// . /// public class TemplateRouteRouteAsyncValues diff --git a/src/Microsoft.AspNet.Routing/Resources.resx b/src/Microsoft.AspNet.Routing/Resources.resx index f45d9ff7ee..b4ce8a15c3 100644 --- a/src/Microsoft.AspNet.Routing/Resources.resx +++ b/src/Microsoft.AspNet.Routing/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Routing/RouteBuilderExtensions.cs b/src/Microsoft.AspNet.Routing/RouteBuilderExtensions.cs index 6214393f3b..a45497c6b8 100644 --- a/src/Microsoft.AspNet.Routing/RouteBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Routing/RouteBuilderExtensions.cs @@ -68,7 +68,7 @@ namespace Microsoft.AspNet.Routing { return dictionary; } - + return new RouteValueDictionary(value); } } diff --git a/src/Microsoft.AspNet.Routing/RouteConstraintBuilder.cs b/src/Microsoft.AspNet.Routing/RouteConstraintBuilder.cs index 707a9f7e7e..59f8efbe2d 100644 --- a/src/Microsoft.AspNet.Routing/RouteConstraintBuilder.cs +++ b/src/Microsoft.AspNet.Routing/RouteConstraintBuilder.cs @@ -70,7 +70,7 @@ namespace Microsoft.AspNet.Routing /// /// /// If the is a string, it will be converted to a . - /// + /// /// For example, the string Product[0-9]+ will be converted to the regular expression /// ^(Product[0-9]+). See for more details. /// diff --git a/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs b/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs index bbe738eeab..1fab64e3a0 100644 --- a/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs +++ b/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs @@ -54,12 +54,12 @@ namespace Microsoft.AspNet.Routing { var type = obj.GetType(); var allProperties = type.GetRuntimeProperties(); - + // This is done to support 'new' properties that hide a property on a base class var orderedByDeclaringType = allProperties.OrderBy(p => p.DeclaringType == type ? 0 : 1); foreach (var property in orderedByDeclaringType) { - if (property.GetMethod != null && + if (property.GetMethod != null && property.GetMethod.IsPublic && !property.GetMethod.IsStatic && property.GetIndexParameters().Length == 0) @@ -210,7 +210,7 @@ namespace Microsoft.AspNet.Routing /// void ICollection>.CopyTo( - [NotNull] KeyValuePair[] array, + [NotNull] KeyValuePair[] array, int arrayIndex) { ((ICollection>)_dictionary).CopyTo(array, arrayIndex); diff --git a/src/Microsoft.AspNet.Routing/RouterMiddleware.cs b/src/Microsoft.AspNet.Routing/RouterMiddleware.cs index e935d998bb..46f357cbc6 100644 --- a/src/Microsoft.AspNet.Routing/RouterMiddleware.cs +++ b/src/Microsoft.AspNet.Routing/RouterMiddleware.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Builder public RouterMiddleware( RequestDelegate next, IServiceProvider services, - ILoggerFactory loggerFactory, + ILoggerFactory loggerFactory, IRouter router) { _next = next; diff --git a/src/Microsoft.AspNet.Routing/Template/TemplateBinder.cs b/src/Microsoft.AspNet.Routing/Template/TemplateBinder.cs index 62faf8db59..423d9e4af1 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplateBinder.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplateBinder.cs @@ -341,7 +341,7 @@ namespace Microsoft.AspNet.Routing.Template private readonly RouteValueDictionary _filters; public TemplateBindingContext( - IReadOnlyDictionary defaults, + IReadOnlyDictionary defaults, IDictionary values) { if (values == null) diff --git a/src/Microsoft.AspNet.Routing/Template/TemplateMatcher.cs b/src/Microsoft.AspNet.Routing/Template/TemplateMatcher.cs index c1c80ff8de..f5768fad5e 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplateMatcher.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplateMatcher.cs @@ -95,7 +95,7 @@ namespace Microsoft.AspNet.Routing.Template } else if (part.IsOptional) { - // This is optional (with no default value) + // This is optional (with no default value) // - there's nothing to capture here, so just move on. } else diff --git a/src/Microsoft.AspNet.Routing/Template/TemplateParser.cs b/src/Microsoft.AspNet.Routing/Template/TemplateParser.cs index 31dbdc30f9..a7fe485d31 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplateParser.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplateParser.cs @@ -176,8 +176,8 @@ namespace Microsoft.AspNet.Routing.Template var rawParameter = context.Capture(); - // At this point, we need to parse the raw name for inline constraint, - // default values and optional parameters. + // At this point, we need to parse the raw name for inline constraint, + // default values and optional parameters. var templatePart = InlineRouteParameterParser.ParseRouteParameter(rawParameter); if (templatePart.IsCatchAll && templatePart.IsOptional) @@ -189,14 +189,14 @@ namespace Microsoft.AspNet.Routing.Template if (templatePart.IsOptional && templatePart.DefaultValue != null) { // Cannot be optional and have a default value. - // The only way to declare an optional parameter is to have a ? at the end, - // hence we cannot have both default value and optional parameter within the template. + // The only way to declare an optional parameter is to have a ? at the end, + // hence we cannot have both default value and optional parameter within the template. // A workaround is to add it as a separate entry in the defaults argument. context.Error = Resources.TemplateRoute_OptionalCannotHaveDefaultValue; return false; } - var parameterName = templatePart.Name; + var parameterName = templatePart.Name; if (IsValidParameterName(context, parameterName)) { segment.Parts.Add(templatePart); @@ -232,7 +232,7 @@ namespace Microsoft.AspNet.Routing.Template if (context.Current == OpenBrace) { - // This is an 'escaped' brace in a literal, like "{{foo" - keep going. + // This is an 'escaped' brace in a literal, like "{{foo" - keep going. } else { @@ -254,7 +254,7 @@ namespace Microsoft.AspNet.Routing.Template if (context.Current == CloseBrace) { - // This is an 'escaped' brace in a literal, like "{{foo" - keep going. + // This is an 'escaped' brace in a literal, like "{{foo" - keep going. } else { @@ -292,7 +292,7 @@ namespace Microsoft.AspNet.Routing.Template for (var j = 0; j < segment.Parts.Count; j++) { var part = segment.Parts[j]; - if (part.IsParameter && + if (part.IsParameter && part.IsCatchAll && (i != segments.Count - 1 || j != segment.Parts.Count - 1)) { @@ -425,8 +425,8 @@ namespace Microsoft.AspNet.Routing.Template } public HashSet ParameterNames - { - get { return _parameterNames; } + { + get { return _parameterNames; } } public bool Back() diff --git a/src/Microsoft.AspNet.Routing/Template/TemplatePart.cs b/src/Microsoft.AspNet.Routing/Template/TemplatePart.cs index f5d7953791..65099bce1a 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplatePart.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplatePart.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Routing.Template }; } - public static TemplatePart CreateParameter([NotNull] string name, + public static TemplatePart CreateParameter([NotNull] string name, bool isCatchAll, bool isOptional, object defaultValue, diff --git a/src/Microsoft.AspNet.Routing/Template/TemplateRoute.cs b/src/Microsoft.AspNet.Routing/Template/TemplateRoute.cs index 86409a6a5c..9af02c11a4 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplateRoute.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplateRoute.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Routing.Template public TemplateRoute( [NotNull] IRouter target, - string routeTemplate, + string routeTemplate, IInlineConstraintResolver inlineConstraintResolver) : this(target, routeTemplate, @@ -259,7 +259,7 @@ namespace Microsoft.AspNet.Routing.Template private static IReadOnlyDictionary GetConstraints( IInlineConstraintResolver inlineConstraintResolver, string template, - RouteTemplate parsedTemplate, + RouteTemplate parsedTemplate, IDictionary constraints) { var constraintBuilder = new RouteConstraintBuilder(inlineConstraintResolver, template); diff --git a/src/Microsoft.AspNet.Routing/Template/TemplateValuesResult.cs b/src/Microsoft.AspNet.Routing/Template/TemplateValuesResult.cs index 25ee34a998..3e71facb27 100644 --- a/src/Microsoft.AspNet.Routing/Template/TemplateValuesResult.cs +++ b/src/Microsoft.AspNet.Routing/Template/TemplateValuesResult.cs @@ -16,14 +16,14 @@ namespace Microsoft.AspNet.Routing.Template public IDictionary AcceptedValues { get; set; } /// - /// The set of values that that were supplied for URL generation. + /// The set of values that that were supplied for URL generation. /// /// /// This combines implicit (ambient) values from the of the current request /// (if applicable), explictly provided values, and default values for parameters that appear in /// the route template. - /// - /// Implicit (ambient) values which are invalidated due to changes in values lexically earlier in the + /// + /// Implicit (ambient) values which are invalidated due to changes in values lexically earlier in the /// route template are excluded from this set. /// public IDictionary CombinedValues { get; set; } diff --git a/src/Microsoft.AspNet.Routing/VirtualPathContext.cs b/src/Microsoft.AspNet.Routing/VirtualPathContext.cs index 77915c03be..a34f8c56e1 100644 --- a/src/Microsoft.AspNet.Routing/VirtualPathContext.cs +++ b/src/Microsoft.AspNet.Routing/VirtualPathContext.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Routing public class VirtualPathContext { public VirtualPathContext(HttpContext httpContext, - IDictionary ambientValues, + IDictionary ambientValues, IDictionary values) : this(httpContext, ambientValues, values, null) { @@ -28,14 +28,14 @@ namespace Microsoft.AspNet.Routing public string RouteName { get; private set; } - public IDictionary ProvidedValues { get; set; } + public IDictionary ProvidedValues { get; set; } - public IDictionary AmbientValues { get; private set; } + public IDictionary AmbientValues { get; private set; } public HttpContext Context { get; private set; } public bool IsBound { get; set; } - public IDictionary Values { get; private set; } + public IDictionary Values { get; private set; } } } diff --git a/test/Microsoft.AspNet.Routing.Tests/Constraints/BoolRouteConstraintTests.cs b/test/Microsoft.AspNet.Routing.Tests/Constraints/BoolRouteConstraintTests.cs index 134ff6ae52..18a4f6f821 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Constraints/BoolRouteConstraintTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Constraints/BoolRouteConstraintTests.cs @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Routing.Tests { // Arrange var constraint = new BoolRouteConstraint(); - + // Act var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue); diff --git a/test/Microsoft.AspNet.Routing.Tests/Constraints/CompositeRouteConstraintTests.cs b/test/Microsoft.AspNet.Routing.Tests/Constraints/CompositeRouteConstraintTests.cs index 57f0483e0d..1f616a860c 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Constraints/CompositeRouteConstraintTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Constraints/CompositeRouteConstraintTests.cs @@ -35,7 +35,7 @@ namespace Microsoft.AspNet.Routing.Tests Assert.Equal(expected, actual); } - static Expression> ConstraintMatchMethodExpression = + static Expression> ConstraintMatchMethodExpression = c => c.Match(It.IsAny(), It.IsAny(), It.IsAny(), diff --git a/test/Microsoft.AspNet.Routing.Tests/Constraints/RequiredRouteConstraintTests.cs b/test/Microsoft.AspNet.Routing.Tests/Constraints/RequiredRouteConstraintTests.cs index 81c9593c40..2d4425fa45 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Constraints/RequiredRouteConstraintTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Constraints/RequiredRouteConstraintTests.cs @@ -23,9 +23,9 @@ namespace Microsoft.AspNet.Routing.Tests // Act var result = constraint.Match( - Mock.Of(), - Mock.Of(), - "area", + Mock.Of(), + Mock.Of(), + "area", new RouteValueDictionary(new { controller = "Home", action = "Index" }), direction); diff --git a/test/Microsoft.AspNet.Routing.Tests/DefaultInlineConstraintResolverTest.cs b/test/Microsoft.AspNet.Routing.Tests/DefaultInlineConstraintResolverTest.cs index 52a1923fac..d0248ea88a 100644 --- a/test/Microsoft.AspNet.Routing.Tests/DefaultInlineConstraintResolverTest.cs +++ b/test/Microsoft.AspNet.Routing.Tests/DefaultInlineConstraintResolverTest.cs @@ -268,7 +268,7 @@ namespace Microsoft.AspNet.Routing.Tests // Act & Assert var ex = Assert.Throws(() => resolver.ResolveConstraint("custom")); Assert.Equal("The constraint type 'System.String' which is mapped to constraint key 'custom'"+ - " must implement the 'IRouteConstraint' interface.", + " must implement the 'IRouteConstraint' interface.", ex.Message); } diff --git a/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs b/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs index c59a32023c..bcbb849b3f 100644 --- a/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs @@ -91,7 +91,7 @@ namespace Microsoft.AspNet.Routing.Tests { // Arrange & Act var template = ParseRouteTemplate(@"some/url-{p1:int:test(3)=hello}/{p2=abc}/{p3?}"); - + // Assert var parameters = template.Parameters.ToArray(); diff --git a/test/Microsoft.AspNet.Routing.Tests/Logging/TestSink.cs b/test/Microsoft.AspNet.Routing.Tests/Logging/TestSink.cs index 824166300f..e01a3b869a 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Logging/TestSink.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Logging/TestSink.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Routing public class TestSink { public TestSink( - Func writeEnabled = null, + Func writeEnabled = null, Func beginEnabled = null) { WriteEnabled = writeEnabled; diff --git a/test/Microsoft.AspNet.Routing.Tests/RouteValueDictionaryTests.cs b/test/Microsoft.AspNet.Routing.Tests/RouteValueDictionaryTests.cs index edce6573a9..67ed463f44 100644 --- a/test/Microsoft.AspNet.Routing.Tests/RouteValueDictionaryTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/RouteValueDictionaryTests.cs @@ -227,10 +227,10 @@ namespace Microsoft.AspNet.Routing.Tests private class IndexerProperty { - public bool this[string key] + public bool this[string key] { - get { return false; } - set {} + get { return false; } + set {} } } } diff --git a/test/Microsoft.AspNet.Routing.Tests/RouterMiddlewareTest.cs b/test/Microsoft.AspNet.Routing.Tests/RouterMiddlewareTest.cs index efb4e5d45b..80217ce62d 100644 --- a/test/Microsoft.AspNet.Routing.Tests/RouterMiddlewareTest.cs +++ b/test/Microsoft.AspNet.Routing.Tests/RouterMiddlewareTest.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Routing var isHandled = false; var sink = new TestSink( - TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName, TestSink.EnableWithTypeName); var loggerFactory = new TestLoggerFactory(sink, enabled: true); diff --git a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs index 3e462aa45c..9fa3579294 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs @@ -25,100 +25,100 @@ namespace Microsoft.AspNet.Routing.Template.Tests { new object[] { - "Test/{val1}/{val2}", + "Test/{val1}/{val2}", new RouteValueDictionary(new {val1 = "", val2 = ""}), - new RouteValueDictionary(new {val2 = "SomeVal2"}), + new RouteValueDictionary(new {val2 = "SomeVal2"}), null, }, new object[] { - "Test/{val1}/{val2}", + "Test/{val1}/{val2}", new RouteValueDictionary(new {val1 = "", val2 = ""}), - new RouteValueDictionary(new {val1 = "a"}), + new RouteValueDictionary(new {val1 = "a"}), "Test/a" }, new object[] { - "Test/{val1}/{val2}/{val3}", + "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "", val3 = ""}), - new RouteValueDictionary(new {val2 = "a"}), + new RouteValueDictionary(new {val2 = "a"}), null }, new object[] { - "Test/{val1}/{val2}", + "Test/{val1}/{val2}", new RouteValueDictionary(new {val1 = "", val2 = ""}), - new RouteValueDictionary(new {val1 = "a", val2 = "b"}), + new RouteValueDictionary(new {val1 = "a", val2 = "b"}), "Test/a/b" }, new object[] { - "Test/{val1}/{val2}/{val3}", + "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "", val2 = "", val3 = ""}), - new RouteValueDictionary(new {val1 = "a", val2 = "b", val3 = "c"}), + new RouteValueDictionary(new {val1 = "a", val2 = "b", val3 = "c"}), "Test/a/b/c" }, new object[] { - "Test/{val1}/{val2}/{val3}", + "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "", val2 = "", val3 = ""}), - new RouteValueDictionary(new {val1 = "a", val2 = "b"}), + new RouteValueDictionary(new {val1 = "a", val2 = "b"}), "Test/a/b" }, new object[] { - "Test/{val1}/{val2}/{val3}", + "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "", val2 = "", val3 = ""}), - new RouteValueDictionary(new {val1 = "a"}), + new RouteValueDictionary(new {val1 = "a"}), "Test/a" }, new object[] { - "Test/{val1}", + "Test/{val1}", new RouteValueDictionary(new {val1 = "42", val2 = "", val3 = ""}), - new RouteValueDictionary(), + new RouteValueDictionary(), "Test" }, new object[] { "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "42", val2 = (string)null, val3 = (string)null}), - new RouteValueDictionary(), + new RouteValueDictionary(), "Test" }, new object[] { "Test/{val1}/{val2}/{val3}/{val4}", new RouteValueDictionary(new {val1 = "21", val2 = "", val3 = "", val4 = ""}), - new RouteValueDictionary(new {val1 = "42", val2 = "11", val3 = "", val4 = ""}), + new RouteValueDictionary(new {val1 = "42", val2 = "11", val3 = "", val4 = ""}), "Test/42/11" }, new object[] { - "Test/{val1}/{val2}/{val3}", + "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "21", val2 = "", val3 = ""}), - new RouteValueDictionary(new {val1 = "42"}), + new RouteValueDictionary(new {val1 = "42"}), "Test/42" }, new object[] { "Test/{val1}/{val2}/{val3}/{val4}", new RouteValueDictionary(new {val1 = "21", val2 = "", val3 = "", val4 = ""}), - new RouteValueDictionary(new {val1 = "42", val2 = "11"}), + new RouteValueDictionary(new {val1 = "42", val2 = "11"}), "Test/42/11" }, new object[] { "Test/{val1}/{val2}/{val3}", new RouteValueDictionary(new {val1 = "21", val2 = (string)null, val3 = (string)null}), - new RouteValueDictionary(new {val1 = "42"}), + new RouteValueDictionary(new {val1 = "42"}), "Test/42" }, new object[] { "Test/{val1}/{val2}/{val3}/{val4}", new RouteValueDictionary(new {val1 = "21", val2 = (string)null, val3 = (string)null, val4 = (string)null}), - new RouteValueDictionary(new {val1 = "42", val2 = "11"}), + new RouteValueDictionary(new {val1 = "42", val2 = "11"}), "Test/42/11" }, }; @@ -901,8 +901,8 @@ namespace Microsoft.AspNet.Routing.Template.Tests { // DevDiv Bugs 199612: UrlRouting: UrlGeneration should not append parameter to query string if it is a Constraint parameter and not a Url parameter RunTest( - "{Controller}.mvc/{action}/{end}", - null, + "{Controller}.mvc/{action}/{end}", + null, new RouteValueDictionary(new { foo = CreateHttpMethodConstraint("GET") }), new RouteValueDictionary(), new RouteValueDictionary(new { controller = "Orders", action = "Index", end = "end", foo = "GET" }), diff --git a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateRouteTest.cs b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateRouteTest.cs index e5b37e5743..13b2a860d1 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateRouteTest.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateRouteTest.cs @@ -520,7 +520,7 @@ namespace Microsoft.AspNet.Routing.Template { // Arrange var route = CreateRoute( - "{controller}/{action}", + "{controller}/{action}", defaults: new { action = "Index" }, dataTokens: new { culture = "en-CA" }); @@ -1057,7 +1057,7 @@ namespace Microsoft.AspNet.Routing.Template // Arrange var routeBuilder = CreateRouteBuilder(); - // Act + // Act routeBuilder.MapRoute("mockName", "{controller}/{action}", defaults: null, diff --git a/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs b/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs index 8f11a587db..2fb88d12da 100644 --- a/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs @@ -60,7 +60,7 @@ namespace Microsoft.AspNet.Routing.Tests public void EmptyDefaultValue_WithOptionalParameter_Throws() { // Arrange - var message = "An optional parameter cannot have default value." + Environment.NewLine + + var message = "An optional parameter cannot have default value." + Environment.NewLine + "Parameter name: routeTemplate"; var routeBuilder = CreateRouteBuilder(); @@ -78,7 +78,7 @@ namespace Microsoft.AspNet.Routing.Tests public void NonEmptyDefaultValue_WithOptionalParameter_Throws() { // Arrange - var message = "An optional parameter cannot have default value." + Environment.NewLine + + var message = "An optional parameter cannot have default value." + Environment.NewLine + "Parameter name: routeTemplate"; var routeBuilder = CreateRouteBuilder();