Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Correct StyleCop violations
Browse files Browse the repository at this point in the history
- StyleCop working again (handles C# 6.0 additions) though only locally for me
- disable some new rules:
 - ConstFieldNamesMustBeginWithUpperCaseLetter
 - InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements
 - StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements
 - StaticReadonlyFieldsMustBeginWithUpperCaseLetter
 - PrefixCallsCorrectly
- correct remaining violations
 - lots of long lines for example
 - use more `var`; some manual updates since StyleCop doesn't check seemingly-unused blocks

nit: remove new trailing whitespace (was paranoid about adding it w/ fixes)
  • Loading branch information
dougbu committed Jan 7, 2015
1 parent 227f564 commit 6df288b
Show file tree
Hide file tree
Showing 90 changed files with 674 additions and 444 deletions.
27 changes: 26 additions & 1 deletion Settings.StyleCop
Expand Up @@ -12,6 +12,11 @@
<Analyzers> <Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.NamingRules"> <Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
<Rules> <Rules>
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotBeginWithUnderscore"> <Rule Name="FieldNamesMustNotBeginWithUnderscore">
<RuleSettings> <RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
Expand All @@ -22,6 +27,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings> </RuleSettings>
</Rule> </Rule>
<Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules> </Rules>
<AnalyzerSettings> <AnalyzerSettings>
<CollectionProperty Name="Hungarian"> <CollectionProperty Name="Hungarian">
Expand Down Expand Up @@ -274,6 +284,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings> </RuleSettings>
</Rule> </Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis"> <Rule Name="PrefixLocalCallsWithThis">
<RuleSettings> <RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
Expand Down Expand Up @@ -384,11 +399,21 @@
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings> </RuleSettings>
</Rule> </Rule>
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements"> <Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings> <RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings> </RuleSettings>
</Rule> </Rule>
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules> </Rules>
<AnalyzerSettings /> <AnalyzerSettings />
</Analyzer> </Analyzer>
Expand All @@ -399,7 +424,7 @@
<BooleanProperty Name="Enabled">False</BooleanProperty> <BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings> </RuleSettings>
</Rule> </Rule>

<!-- Creates a lot of noise with anonymous objects --> <!-- Creates a lot of noise with anonymous objects -->
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly"> <Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings> <RuleSettings>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Mvc.Common/TypeExtensions.cs
Expand Up @@ -19,7 +19,7 @@ private static bool EqualTo([NotNull] this Type[] t1, [NotNull] Type[] t2)
return false; return false;
} }


for (int idx = 0; idx < t1.Length; ++idx) for (var idx = 0; idx < t1.Length; ++idx)
{ {
if (t1[idx] != t2[idx]) if (t1[idx] != t2[idx])
{ {
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.AspNet.Mvc.Core/ActionResults/FilePathResult.cs
Expand Up @@ -119,7 +119,6 @@ internal string ResolveFilePath(IFileSystem fileSystem)
throw new FileNotFoundException(message, path); throw new FileNotFoundException(message, path);
} }


// Internal for unit testing purposes only
/// <summary> /// <summary>
/// Creates a normalized representation of the given <paramref name="path"/>. The default /// Creates a normalized representation of the given <paramref name="path"/>. The default
/// implementation doesn't support files with '\' in the file name and treats the '\' as /// implementation doesn't support files with '\' in the file name and treats the '\' as
Expand All @@ -128,6 +127,7 @@ internal string ResolveFilePath(IFileSystem fileSystem)
/// </summary> /// </summary>
/// <param name="path">The path to normalize.</param> /// <param name="path">The path to normalize.</param>
/// <returns>The normalized path.</returns> /// <returns>The normalized path.</returns>
// Internal for unit testing purposes only
protected internal virtual string NormalizePath([NotNull] string path) protected internal virtual string NormalizePath([NotNull] string path)
{ {
// Unix systems support '\' as part of the file name. So '\' is not // Unix systems support '\' as part of the file name. So '\' is not
Expand All @@ -153,13 +153,13 @@ protected internal virtual string NormalizePath([NotNull] string path)
return path.Replace('\\', '/'); return path.Replace('\\', '/');
} }


// Internal for unit testing purposes only
/// <summary> /// <summary>
/// Determines if the provided path is absolute or relative. The default implementation considers /// Determines if the provided path is absolute or relative. The default implementation considers
/// paths starting with '/' to be relative. /// paths starting with '/' to be relative.
/// </summary> /// </summary>
/// <param name="path">The path to examine.</param> /// <param name="path">The path to examine.</param>
/// <returns>True if the path is absolute.</returns> /// <returns>True if the path is absolute.</returns>
// Internal for unit testing purposes only
protected internal virtual bool IsPathRooted([NotNull] string path) protected internal virtual bool IsPathRooted([NotNull] string path)
{ {
// We consider paths to be rooted if they start with '<<VolumeLetter>>:' and do // We consider paths to be rooted if they start with '<<VolumeLetter>>:' and do
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Mvc.Core/ActionResults/FileResult.cs
Expand Up @@ -84,7 +84,7 @@ private static void AddByteToStringBuilder(byte b, StringBuilder builder)
{ {
builder.Append('%'); builder.Append('%');


int i = b; var i = b;
AddHexDigitToStringBuilder(i >> 4, builder); AddHexDigitToStringBuilder(i >> 4, builder);
AddHexDigitToStringBuilder(i % 16, builder); AddHexDigitToStringBuilder(i % 16, builder);
} }
Expand Down
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Copyright (c) Microsoft Open Technologies, Inc. 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 Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
internal sealed class AntiForgeryToken internal sealed class AntiForgeryToken
Expand Down
Expand Up @@ -23,7 +23,8 @@ internal sealed class AntiForgeryTokenStore : ITokenStore


public AntiForgeryToken GetCookieToken(HttpContext httpContext) public AntiForgeryToken GetCookieToken(HttpContext httpContext)
{ {
var contextAccessor = httpContext.RequestServices.GetRequiredService<IContextAccessor<AntiForgeryContext>>(); var contextAccessor =
httpContext.RequestServices.GetRequiredService<IContextAccessor<AntiForgeryContext>>();
if (contextAccessor.Value != null) if (contextAccessor.Value != null)
{ {
return contextAccessor.Value.CookieToken; return contextAccessor.Value.CookieToken;
Expand Down Expand Up @@ -56,7 +57,8 @@ public void SaveCookieToken(HttpContext httpContext, AntiForgeryToken token)
{ {
// Add the cookie to the request based context. // Add the cookie to the request based context.
// This is useful if the cookie needs to be reloaded in the context of the same request. // This is useful if the cookie needs to be reloaded in the context of the same request.
var contextAccessor = httpContext.RequestServices.GetRequiredService<IContextAccessor<AntiForgeryContext>>(); var contextAccessor =
httpContext.RequestServices.GetRequiredService<IContextAccessor<AntiForgeryContext>>();
Debug.Assert(contextAccessor.Value == null, "AntiForgeryContext should be set only once per request."); Debug.Assert(contextAccessor.Value == null, "AntiForgeryContext should be set only once per request.");
contextAccessor.SetValue(new AntiForgeryContext() { CookieToken = token }); contextAccessor.SetValue(new AntiForgeryContext() { CookieToken = token });


Expand Down
Expand Up @@ -233,7 +233,6 @@ private bool IsIDisposableMethod(MethodInfo methodInfo, TypeInfo typeInfo)
typeInfo.GetRuntimeInterfaceMap(typeof(IDisposable)).TargetMethods[0] == methodInfo); typeInfo.GetRuntimeInterfaceMap(typeof(IDisposable)).TargetMethods[0] == methodInfo);
} }



/// <summary> /// <summary>
/// Creates an <see cref="ActionModel"/> for the given <see cref="MethodInfo"/>. /// Creates an <see cref="ActionModel"/> for the given <see cref="MethodInfo"/>.
/// </summary> /// </summary>
Expand Down
33 changes: 16 additions & 17 deletions src/Microsoft.AspNet.Mvc.Core/Controller.cs
Expand Up @@ -67,9 +67,8 @@ public IViewEngine ViewEngine
{ {
if (_viewEngine == null) if (_viewEngine == null)
{ {
_viewEngine = ActionContext?. _viewEngine =
HttpContext?. ActionContext?.HttpContext?.RequestServices.GetRequiredService<ICompositeViewEngine>();
RequestServices.GetRequiredService<ICompositeViewEngine>();
} }


return _viewEngine; return _viewEngine;
Expand Down Expand Up @@ -797,7 +796,7 @@ public virtual void OnActionExecuted([NotNull] ActionExecutedContext context)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using values from the controller's current /// Updates the specified <paramref name="model"/> instance using values from the controller's current
/// <see cref="IValueProvider"/>. /// <see cref="IValueProvider"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
Expand All @@ -811,7 +810,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using values from the controller's current /// Updates the specified <paramref name="model"/> instance using values from the controller's current
/// <see cref="IValueProvider"/> and a <paramref name="prefix"/>. /// <see cref="IValueProvider"/> and a <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
Expand All @@ -826,7 +825,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
{ {
if (BindingContextProvider == null) if (BindingContextProvider == null)
{ {
var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider), var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider),
GetType().FullName); GetType().FullName);
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
Expand All @@ -836,7 +835,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a /// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a
/// <paramref name="prefix"/>. /// <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
Expand All @@ -853,7 +852,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
{ {
if (BindingContextProvider == null) if (BindingContextProvider == null)
{ {
var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider), var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider),
GetType().FullName); GetType().FullName);
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
Expand All @@ -870,14 +869,14 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using values from the controller's current /// Updates the specified <paramref name="model"/> instance using values from the controller's current
/// <see cref="IValueProvider"/> and a <paramref name="prefix"/>. /// <see cref="IValueProvider"/> and a <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
/// <param name="model">The model instance to update.</param> /// <param name="model">The model instance to update.</param>
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="IValueProvider"/>. /// <param name="prefix">The prefix to use when looking up values in the current <see cref="IValueProvider"/>.
/// </param> /// </param>
/// <param name="includeExpressions"> <see cref="Expression"/>(s) which represent top-level properties /// <param name="includeExpressions"> <see cref="Expression"/>(s) which represent top-level properties
/// which need to be included for the current model.</param> /// which need to be included for the current model.</param>
/// <returns>A <see cref="Task"/> that on completion returns <c>true</c> if the update is successful</returns> /// <returns>A <see cref="Task"/> that on completion returns <c>true</c> if the update is successful</returns>
[NonAction] [NonAction]
Expand Down Expand Up @@ -907,7 +906,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using values from the controller's current /// Updates the specified <paramref name="model"/> instance using values from the controller's current
/// <see cref="IValueProvider"/> and a <paramref name="prefix"/>. /// <see cref="IValueProvider"/> and a <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
Expand All @@ -925,7 +924,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
{ {
if (BindingContextProvider == null) if (BindingContextProvider == null)
{ {
var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider), var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider),
GetType().FullName); GetType().FullName);
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
Expand All @@ -943,15 +942,15 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a /// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a
/// <paramref name="prefix"/>. /// <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
/// <param name="model">The model instance to update.</param> /// <param name="model">The model instance to update.</param>
/// <param name="prefix">The prefix to use when looking up values in the <paramref name="valueProvider"/> /// <param name="prefix">The prefix to use when looking up values in the <paramref name="valueProvider"/>
/// </param> /// </param>
/// <param name="valueProvider">The <see cref="IValueProvider"/> used for looking up values.</param> /// <param name="valueProvider">The <see cref="IValueProvider"/> used for looking up values.</param>
/// <param name="includeExpressions"> <see cref="Expression"/>(s) which represent top-level properties /// <param name="includeExpressions"> <see cref="Expression"/>(s) which represent top-level properties
/// which need to be included for the current model.</param> /// which need to be included for the current model.</param>
/// <returns>A <see cref="Task"/> that on completion returns <c>true</c> if the update is successful</returns> /// <returns>A <see cref="Task"/> that on completion returns <c>true</c> if the update is successful</returns>
[NonAction] [NonAction]
Expand All @@ -964,7 +963,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
{ {
if (BindingContextProvider == null) if (BindingContextProvider == null)
{ {
var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider), var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider),
GetType().FullName); GetType().FullName);
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
Expand All @@ -982,7 +981,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
} }


/// <summary> /// <summary>
/// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a /// Updates the specified <paramref name="model"/> instance using the <paramref name="valueProvider"/> and a
/// <paramref name="prefix"/>. /// <paramref name="prefix"/>.
/// </summary> /// </summary>
/// <typeparam name="TModel">The type of the model object.</typeparam> /// <typeparam name="TModel">The type of the model object.</typeparam>
Expand All @@ -1002,7 +1001,7 @@ public virtual Task<bool> TryUpdateModelAsync<TModel>([NotNull] TModel model)
{ {
if (BindingContextProvider == null) if (BindingContextProvider == null)
{ {
var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider), var message = Resources.FormatPropertyOfTypeCannotBeNull(nameof(BindingContextProvider),
GetType().FullName); GetType().FullName);
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
Expand Down
Expand Up @@ -5,8 +5,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.AspNet.Mvc.ApplicationModels; using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Logging;
using Microsoft.Framework.Logging; using Microsoft.Framework.Logging;
using Microsoft.Framework.OptionsModel; using Microsoft.Framework.OptionsModel;


Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.AspNet.Mvc.Core/DefaultAssemblyProvider.cs
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc
public class DefaultAssemblyProvider : IAssemblyProvider public class DefaultAssemblyProvider : IAssemblyProvider
{ {
/// <summary> /// <summary>
/// Gets the set of assembly names that are used as root for discovery of /// Gets the set of assembly names that are used as root for discovery of
/// MVC controllers, view components and views. /// MVC controllers, view components and views.
/// </summary> /// </summary>
protected virtual HashSet<string> ReferenceAssemblies { get; } = new HashSet<string>(StringComparer.Ordinal) protected virtual HashSet<string> ReferenceAssemblies { get; } = new HashSet<string>(StringComparer.Ordinal)
Expand Down Expand Up @@ -44,7 +44,7 @@ public IEnumerable<Assembly> CandidateAssemblies


/// <summary> /// <summary>
/// Returns a list of libraries that references the assemblies in <see cref="ReferenceAssemblies"/>. /// Returns a list of libraries that references the assemblies in <see cref="ReferenceAssemblies"/>.
/// By default it returns all assemblies that reference any of the primary MVC assemblies /// By default it returns all assemblies that reference any of the primary MVC assemblies
/// while ignoring MVC assemblies. /// while ignoring MVC assemblies.
/// </summary> /// </summary>
/// <returns>A set of <see cref="ILibraryInformation"/>.</returns> /// <returns>A set of <see cref="ILibraryInformation"/>.</returns>
Expand Down
Expand Up @@ -87,7 +87,8 @@ private void UpdateParameterMetadata(ModelMetadata metadata, IBinderMetadata bin
foreach (var parameter in parameterMetadata) foreach (var parameter in parameterMetadata)
{ {
var parameterType = parameter.ModelType; var parameterType = parameter.ModelType;
var modelBindingContext = GetModelBindingContext(parameter, actionBindingContext, operationBindingContext); var modelBindingContext =
GetModelBindingContext(parameter, actionBindingContext, operationBindingContext);
if (await actionBindingContext.ModelBinder.BindModelAsync(modelBindingContext)) if (await actionBindingContext.ModelBinder.BindModelAsync(modelBindingContext))
{ {
arguments[parameter.PropertyName] = modelBindingContext.Model; arguments[parameter.PropertyName] = modelBindingContext.Model;
Expand Down
Expand Up @@ -17,7 +17,8 @@ namespace Microsoft.AspNet.Mvc
public class DefaultPropertyBindingPredicateProvider<TModel> : IPropertyBindingPredicateProvider public class DefaultPropertyBindingPredicateProvider<TModel> : IPropertyBindingPredicateProvider
where TModel : class where TModel : class
{ {
private static readonly Func<ModelBindingContext, string, bool> _defaultFilter = (context, propertyName) => true; private static readonly Func<ModelBindingContext, string, bool> _defaultFilter =
(context, propertyName) => true;


/// <summary> /// <summary>
/// The prefix which is used while generating the property filter. /// The prefix which is used while generating the property filter.
Expand Down Expand Up @@ -57,7 +58,8 @@ public virtual string Prefix
} }
} }


private Func<ModelBindingContext, string, bool> GetPredicateFromExpression(IEnumerable<Expression<Func<TModel, object>>> includeExpressions) private Func<ModelBindingContext, string, bool> GetPredicateFromExpression(
IEnumerable<Expression<Func<TModel, object>>> includeExpressions)
{ {
var expression = ModelBindingHelper.GetIncludePredicateExpression(Prefix, includeExpressions.ToArray()); var expression = ModelBindingHelper.GetIncludePredicateExpression(Prefix, includeExpressions.ToArray());
return expression.Compile(); return expression.Compile();
Expand Down
Expand Up @@ -45,7 +45,6 @@ public int Order
get { return DefaultOrder.DefaultFrameworkSortOrder; } get { return DefaultOrder.DefaultFrameworkSortOrder; }
} }



/// <inheritdoc /> /// <inheritdoc />
public void Invoke(ApiDescriptionProviderContext context, Action callNext) public void Invoke(ApiDescriptionProviderContext context, Action callNext)
{ {
Expand Down Expand Up @@ -157,7 +156,8 @@ public void Invoke(ApiDescriptionProviderContext context, Action callNext)
// Process parameters that only appear on the path template if any. // Process parameters that only appear on the path template if any.
foreach (var templateParameter in templateParameters) foreach (var templateParameter in templateParameters)
{ {
var parameterDescription = GetParameter(parameterDescriptor: null, templateParameter: templateParameter); var parameterDescription =
GetParameter(parameterDescriptor: null, templateParameter: templateParameter);
apiDescription.ParameterDescriptions.Add(parameterDescription); apiDescription.ParameterDescriptions.Add(parameterDescription);
} }
} }
Expand Down
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Copyright (c) Microsoft Open Technologies, Inc. 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 Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
public interface IAuthorizationFilter : IFilter public interface IAuthorizationFilter : IFilter
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Copyright (c) Microsoft Open Technologies, Inc. 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 Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
public interface IExceptionFilter : IFilter public interface IExceptionFilter : IFilter
Expand Down
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Copyright (c) Microsoft Open Technologies, Inc. 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 Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
public interface IInputFormatterSelector public interface IInputFormatterSelector
Expand Down

0 comments on commit 6df288b

Please sign in to comment.