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.
Fix for #1913 - Improve attribute route link generation for areas
Attribute route link generation will now have a slight preference for entries that can use ambient values (vs ignoring an ambient value). This means that areas will be more 'sticky' with regard to link generation without the need to specify a better Order.
- Loading branch information
Showing
6 changed files
with
76 additions
and
37 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
23 changes: 23 additions & 0 deletions
23
src/Microsoft.AspNet.Mvc.Core/Internal/Routing/LinkGenerationMatch.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,23 @@ | ||
// 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 Microsoft.AspNet.Mvc.Routing; | ||
|
||
namespace Microsoft.AspNet.Mvc.Internal.Routing | ||
{ | ||
public struct LinkGenerationMatch | ||
{ | ||
private readonly bool _isFallbackMatch; | ||
private readonly AttributeRouteLinkGenerationEntry _entry; | ||
|
||
public LinkGenerationMatch(AttributeRouteLinkGenerationEntry entry, bool isFallbackMatch) | ||
{ | ||
_entry = entry; | ||
_isFallbackMatch = isFallbackMatch; | ||
} | ||
|
||
public AttributeRouteLinkGenerationEntry Entry { get { return _entry; } } | ||
|
||
public bool IsFallbackMatch { get { return _isFallbackMatch; } } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,4 +107,4 @@ public async Task AttributeRoute_UsesUpdatedActionDescriptors() | |
} | ||
} | ||
} | ||
#endif | ||
#endif |