This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
872 additions
and
4,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
src/Microsoft.AspNet.Mvc.Core/DefaultValidationExcludeFiltersProvider.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/Microsoft.AspNet.Mvc.Core/ExcludeTypeValidationFilterExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// 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. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.AspNet.Mvc.ModelBinding.Validation; | ||
|
||
namespace Microsoft.AspNet.Mvc | ||
{ | ||
/// <summary> | ||
/// Extensions for <see cref="IList{IExcludeTypeValidationFilter}"/>. | ||
/// </summary> | ||
public static class ExcludeTypeValidationFilterExtensions | ||
{ | ||
/// <summary> | ||
/// Adds a descriptor to the specified <paramref name="excludeTypeValidationFilters" /> that excludes the properties of | ||
/// the <see cref="Type"/> specified and its derived types from validaton. | ||
/// </summary> | ||
/// <param name="excludeTypeValidationFilters">A list of <see cref="IExcludeTypeValidationFilter"/> which are used to | ||
/// get a collection of exclude filters to be applied for filtering model properties during validation. | ||
/// </param> | ||
/// <param name="type"><see cref="Type"/> which should be excluded from validation.</param> | ||
public static void Add(this IList<IExcludeTypeValidationFilter> excludeTypeValidationFilters, Type type) | ||
{ | ||
var typeBasedExcludeFilter = new DefaultTypeBasedExcludeFilter(type); | ||
excludeTypeValidationFilters.Add(typeBasedExcludeFilter); | ||
} | ||
|
||
/// <summary> | ||
/// Adds a descriptor to the specified <paramref name="excludeTypeValidationFilters" /> that excludes the properties of | ||
/// the type specified and its derived types from validaton. | ||
/// </summary> | ||
/// <param name="excludeTypeValidationFilters">A list of <see cref="IExcludeTypeValidationFilter"/> which are used to | ||
/// get a collection of exclude filters to be applied for filtering model properties during validation. | ||
/// </param> | ||
/// <param name="typeFullName">Full name of the type which should be excluded from validation.</param> | ||
public static void Add(this IList<IExcludeTypeValidationFilter> excludeTypeValidationFilters, string typeFullName) | ||
{ | ||
var filter = new DefaultTypeNameBasedExcludeFilter(typeFullName); | ||
excludeTypeValidationFilters.Add(filter); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.