@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Link</title>

    <!-- Plain link tag -->
    <link href="~/styles/site.css" rel="stylesheet" title="&lt;the title>" />

    <!-- Globbed link tag with existing file -->
    <link asp-href-include="**/site.css" rel="stylesheet" title="&lt;the title>" />

    <!-- Globbed link tag with comma separated pattern -->
    <link asp-href-include="~/styles/*.css, ~/styles/sub/*.css" rel="stylesheet" title="&lt;the title" />

    <!-- Globbed link tag with existing file and exclude -->
    <link asp-href-include=" **/*.css" asp-href-exclude="**/site3*.css" rel="stylesheet" title='"the" title' />

    <!-- Globbed link tag missing include -->
    <link asp-href-exclude="**/site2.css" rel="stylesheet">

    <!-- Globbed link tag missing include but with static href -->
    <link href="~/styles/site.css" asp-href-exclude="**/site2.css" rel="stylesheet" />

    <!-- Globbed link tag with missing file -->
    <link asp-href-include="**/notThere.css" rel="stylesheet" />

    <!-- Globbed link tag with file outside of webroot -->
    <link asp-href-include="../**/appRoot.css" rel="stylesheet" />

    <!-- Globbed link tag with file outside of webroot -->
    <link asp-href-include="**/appRoot.css" rel="stylesheet">

    <!-- Globbed link tag with existing file and static href -->
    <link href="~/styles/site.css" asp-href-include="**/site2.css" rel="stylesheet" />

    <!-- Globbed link tag with existing file and static href should dedupe -->
    <link href="~/styles/site.css" asp-href-include="**/site.css" rel="stylesheet" />

    <!-- Fallback to static href -->
    <link href="~/styles/site.min.css?a=b&c=d" rel="stylesheet" data-extra="test" title='"the" title'
          asp-fallback-href="~/styles/site.css?a=b&c=d"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static href with dynamic attributes -->
    <link href="~/styles/site.min.css?a=b&c=d" rel="@("stylesheet")" data-extra="@("test")" title='@(@"""the"" title")'
          asp-fallback-href="~/styles/site.css?a=b&c=d"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static href with custom rel -->
    <link href="~/styles/site.min.css?a=b&c=d" rel="x-stylesheet"
          asp-fallback-href="~/styles/site.css?a=b&c=d"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed href to static href -->
    <link asp-href-include="styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed href with exclude to static href -->
    <link asp-href-include="**/*.min.css" asp-href-exclude=" **/site3.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden">

    <!-- Fallback from globbed and static href to static href -->
    <link href="styles/site.min.css" asp-href-include="styles/site.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed and static href with exclude to static href -->
    <link href="styles/site.min.css" asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css"
          rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static href with no primary href -->
    <link rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden">

    <!-- Fallback to globbed href -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static and globbed href -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-href-include="**/site2.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static and globbed href should dedupe -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to static and globbed href with exclude -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-href-include="**/*.css"
          asp-fallback-href-exclude="**/site3*.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed href to glbobed href -->
    <link asp-href-include="styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed href with exclude to globbed href -->
    <link asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed and static href to globbed href -->
    <link href="styles/site.min.css" asp-href-include="styles/site.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback from globbed and static href with exclude to globbed href -->
    <link href="styles/site.min.css" asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css"
          rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden">

    <!-- Kitchen sink, all the attributes -->
    <link href="styles/site.min.css" asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css"
          rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-href-include="**/*.css"
          asp-fallback-href-exclude="**/site3*.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to globbed href that doesn't exist -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="**/notThere.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback to globbed href outside webroot -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href-include="../**/appRoot.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback with missing attribute -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden" />

    <!-- Fallback with missing attribute -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-value="hidden" />

    <!-- Fallback with missing attribute -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility" />

    <!-- Plain link tag with file version -->
    <link href="~/styles/site.css" rel="stylesheet" asp-append-version="true" />

    <!-- Globbed link tag with existing file and file version -->
    <link asp-href-include="**/site.css" rel="stylesheet" asp-append-version="true" />

    <!-- Fallback with file version -->
    <link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
          asp-fallback-href="~/styles/site.css"
          asp-fallback-test-class="hidden"
          asp-fallback-test-property="visibility"
          asp-fallback-test-value="hidden"
          asp-append-version="true">

    <!-- Globbed link tag with existing file, static href and file version -->
    <link href="~/styles/site.css" asp-href-include="**/*.css" rel="stylesheet" asp-append-version="true" />
</head>
<body>

    <h2>Link Tag Helper Test</h2>

</body>
</html>