From 92408a5c2278807075433e48a1bc19f797fa5bd6 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 27 Apr 2016 17:22:36 -0700 Subject: [PATCH] Move samples to Entropy Partial fix to #4449 --- Mvc.NoFun.sln | 150 ----- Mvc.sln | 150 +---- .../ActionConstraintSample.Web.xproj | 22 - .../Controllers/ItemsController.cs | 15 - .../Controllers/US/ItemsController.cs | 16 - .../CountrySpecificAttribute.cs | 34 -- samples/ActionConstraintSample.Web/Startup.cs | 44 -- .../ActionConstraintSample.Web/project.json | 39 -- samples/ActionConstraintSample.Web/readme.md | 4 - samples/ActionConstraintSample.Web/web.config | 9 - .../Controllers/Canada/ProductsController.cs | 16 - .../Controllers/OrdersControlller.cs | 16 - .../Controllers/Spain/ProductsController.cs | 16 - .../Controllers/US/ProductsController.cs | 16 - .../CustomRouteSample.Web.xproj | 18 - .../CustomRouteSample.Web/LocaleAttribute.cs | 15 - .../CustomRouteSample.Web/LocalizedRoute.cs | 50 -- samples/CustomRouteSample.Web/Startup.cs | 40 -- samples/CustomRouteSample.Web/project.json | 39 -- samples/CustomRouteSample.Web/readme.md | 4 - samples/CustomRouteSample.Web/web.config | 9 - .../Controllers/AdminController.cs | 16 - .../Controllers/HomeController.cs | 21 - .../Areas/Restricted/Views/Admin/Login.cshtml | 1 - .../Views/Home/EchoActionUrl.cshtml | 1 - .../EmbeddedResources/Views/Home/Index.cshtml | 13 - .../EmbeddedViewSample.Web.xproj | 18 - samples/EmbeddedViewSample.Web/Startup.cs | 57 -- samples/EmbeddedViewSample.Web/project.json | 41 -- samples/EmbeddedViewSample.Web/readme.md | 4 - samples/EmbeddedViewSample.Web/web.config | 9 - .../Controllers/FormatFilterController.cs | 25 - .../Controllers/ProducesOverrideClass.cs | 18 - .../FormatFilterSample.Web/CustomFormatter.cs | 47 -- .../FormatFilterSample.Web.xproj | 18 - .../FormatFilterSample.Web/Models/Product.cs | 15 - samples/FormatFilterSample.Web/Startup.cs | 53 -- samples/FormatFilterSample.Web/project.json | 40 -- samples/FormatFilterSample.Web/readme.md | 5 - samples/FormatFilterSample.Web/web.config | 9 - .../IsbnDigitScheme10Constraint.cs | 114 ---- .../IsbnDigitScheme13Constraint.cs | 58 -- .../Controllers/HomeController.cs | 18 - .../Controllers/Isbn10Controller.cs | 16 - .../Controllers/Isbn13Controller.cs | 17 - .../Controllers/ProductsController.cs | 77 --- .../Controllers/StoreController.cs | 24 - .../Controllers/UsersController.cs | 16 - .../InlineConstraintSample.Web.xproj | 18 - samples/InlineConstraintSample.Web/Startup.cs | 53 -- .../Views/Home/Index.cshtml | 8 - .../Views/Shared/Error.cshtml | 7 - .../Views/Shared/_Layout.cshtml | 30 - .../InlineConstraintSample.Web/project.json | 40 -- samples/InlineConstraintSample.Web/readme.md | 6 - samples/InlineConstraintSample.Web/web.config | 9 - .../Controllers/HomeController.cs | 92 --- .../JsonPatchSample.Web.xproj | 18 - .../JsonPatchSample.Web/Models/Category.cs | 13 - .../JsonPatchSample.Web/Models/Customer.cs | 14 - samples/JsonPatchSample.Web/Models/Order.cs | 15 - samples/JsonPatchSample.Web/Models/Product.cs | 12 - .../ProductCategoryConverter.cs | 50 -- .../ReplaceOrderTypeConverter.cs | 29 - samples/JsonPatchSample.Web/Startup.cs | 39 -- samples/JsonPatchSample.Web/project.json | 40 -- samples/JsonPatchSample.Web/readme.md | 4 - samples/JsonPatchSample.Web/web.config | 9 - .../Controllers/HomeController.cs | 42 -- .../LocalizationSample.Web.xproj | 18 - .../LocalizationSample.Web/Models/Product.cs | 13 - samples/LocalizationSample.Web/Models/User.cs | 15 - .../Controllers.HomeController.fr.resx | 129 ---- .../Resources/Models.Product.fr.resx | 123 ---- .../Resources/Models.User.fr.resx | 123 ---- .../Resources/Views.Home.Locpage.en-GB.resx | 132 ----- .../Resources/Views.Home.Locpage.fr.resx | 132 ----- .../Views.Shared._LocalizationLayout.fr.resx | 141 ----- samples/LocalizationSample.Web/Startup.cs | 57 -- .../Views/Home/GetInvalidUser.cshtml | 8 - .../Views/Home/Index.cshtml | 6 - .../Views/Home/Index.en-GB.cshtml | 6 - .../Views/Home/Index.fr.cshtml | 6 - .../Views/Home/Locpage.cshtml | 7 - .../Views/Home/_MyPartial.cshtml | 1 - .../Views/Home/_Partial.cshtml | 1 - .../Views/Home/_Partial.fr.cshtml | 1 - .../Views/Shared/_LocalizationLayout.cshtml | 1 - .../Views/Shared/_MyLayout.cshtml | 1 - .../Views/Shared/_MyLayout.fr.cshtml | 1 - .../Views/Shared/_MyPartial.en-GB.cshtml | 1 - .../Views/_ViewImports.cshtml | 5 - samples/LocalizationSample.Web/project.json | 40 -- samples/LocalizationSample.Web/readme.md | 4 - samples/LocalizationSample.Web/web.config | 9 - .../Areas/Hours/Controllers/HomeController.cs | 18 - .../Areas/Hours/Views/Home/Index.cshtml | 11 - .../Areas/Menu/Controllers/HomeController.cs | 18 - .../Areas/Menu/Views/Home/Index.cshtml | 12 - .../Restaurant/Controllers/HomeController.cs | 17 - .../Areas/Restaurant/Views/Home/Index.cshtml | 15 - .../Controllers/HomeController.cs | 34 -- .../MvcSubAreaSample.Web.xproj | 17 - samples/MvcSubAreaSample.Web/Startup.cs | 53 -- .../MvcSubAreaSample.Web/SubAreaAttribute.cs | 21 - .../SubAreaViewLocationExpander.cs | 40 -- .../Views/Home/Index.cshtml | 15 - .../Views/Shared/_Layout.cshtml | 46 -- samples/MvcSubAreaSample.Web/project.json | 53 -- samples/MvcSubAreaSample.Web/web.config | 9 - .../Components/FeaturedMoviesComponent.cs | 42 -- .../Components/MoviesComponent.cs | 36 -- .../Controllers/HomeController.cs | 90 --- .../Controllers/MoviesController.cs | 45 -- .../Controllers/TagHelperController.cs | 15 - .../Models/FeaturedMovies.cs | 16 - samples/TagHelperSample.Web/Models/User.cs | 22 - .../Services/MoviesService.cs | 67 --- samples/TagHelperSample.Web/Startup.cs | 51 -- .../TagHelperSample.Web.xproj | 18 - .../TagHelpers/CommentMode.cs | 12 - .../TagHelpers/ConditionalCommentTagHelper.cs | 37 -- .../Views/Home/Create.cshtml | 94 --- .../Views/Home/Edit.cshtml | 61 -- .../Views/Home/Index.cshtml | 57 -- .../Views/Movies/Index.cshtml | 43 -- .../Components/FeaturedMovies/Default.cshtml | 17 - .../Views/Shared/_Layout.cshtml | 15 - .../Views/TagHelper/ConditionalComment.cshtml | 9 - .../Views/_ViewImports.cshtml | 1 - .../Views/_ViewStart.cshtml | 3 - samples/TagHelperSample.Web/appRoot.css | 8 - samples/TagHelperSample.Web/project.json | 55 -- samples/TagHelperSample.Web/readme.md | 14 - samples/TagHelperSample.Web/web.config | 9 - .../wwwroot/css/sub/blank.css | 1 - .../TagHelperSample.Web/wwwroot/fallback.js | 6 - .../TagHelperSample.Web/wwwroot/original.js | 10 - samples/TagHelperSample.Web/wwwroot/site.css | 13 - samples/UrlHelperSample.Web/AppOptions.cs | 14 - .../Controllers/HomeController.cs | 30 - .../Controllers/SimplePocoController.cs | 25 - .../UrlHelperSample.Web/CustomUrlHelper.cs | 66 --- .../CustomUrlHelperFactory.cs | 24 - samples/UrlHelperSample.Web/Startup.cs | 52 -- .../UrlHelperSample.Web.xproj | 17 - .../Views/Home/Index.cshtml | 1 - .../Views/SimplePoco/Index.cshtml | 1 - samples/UrlHelperSample.Web/project.json | 40 -- samples/UrlHelperSample.Web/readme.md | 5 - samples/UrlHelperSample.Web/web.config | 9 - .../ActionConstraintSampleTest.cs | 52 -- .../CustomRouteSampleTest.cs | 58 -- .../CustomUrlHelperTest.cs | 67 --- .../EmbeddedViewSampleTest.cs | 73 --- .../FormatFilterSampleTest.cs | 135 ----- .../InlineConstraintSampleTest.cs | 552 ------------------ .../JsonPatchSampleTest.cs | 331 ----------- .../LocalizationSampleTest.cs | 140 ----- .../MvcSandboxTest.cs | 22 +- .../SubAreaTests.cs | 56 -- .../TagHelperSampleTest.cs | 256 -------- .../TagHelperSample.Web.Home.Index-Reset.html | 34 -- .../TagHelperSample.Web.Home.Index.html | 76 --- ...mple.Web.TagHelper.ConditionalComment.html | 19 - .../project.json | 10 - 166 files changed, 4 insertions(+), 6409 deletions(-) delete mode 100644 samples/ActionConstraintSample.Web/ActionConstraintSample.Web.xproj delete mode 100644 samples/ActionConstraintSample.Web/Controllers/ItemsController.cs delete mode 100644 samples/ActionConstraintSample.Web/Controllers/US/ItemsController.cs delete mode 100644 samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs delete mode 100644 samples/ActionConstraintSample.Web/Startup.cs delete mode 100644 samples/ActionConstraintSample.Web/project.json delete mode 100644 samples/ActionConstraintSample.Web/readme.md delete mode 100644 samples/ActionConstraintSample.Web/web.config delete mode 100644 samples/CustomRouteSample.Web/Controllers/Canada/ProductsController.cs delete mode 100644 samples/CustomRouteSample.Web/Controllers/OrdersControlller.cs delete mode 100644 samples/CustomRouteSample.Web/Controllers/Spain/ProductsController.cs delete mode 100644 samples/CustomRouteSample.Web/Controllers/US/ProductsController.cs delete mode 100644 samples/CustomRouteSample.Web/CustomRouteSample.Web.xproj delete mode 100644 samples/CustomRouteSample.Web/LocaleAttribute.cs delete mode 100644 samples/CustomRouteSample.Web/LocalizedRoute.cs delete mode 100644 samples/CustomRouteSample.Web/Startup.cs delete mode 100644 samples/CustomRouteSample.Web/project.json delete mode 100644 samples/CustomRouteSample.Web/readme.md delete mode 100644 samples/CustomRouteSample.Web/web.config delete mode 100644 samples/EmbeddedViewSample.Web/Controllers/AdminController.cs delete mode 100644 samples/EmbeddedViewSample.Web/Controllers/HomeController.cs delete mode 100644 samples/EmbeddedViewSample.Web/EmbeddedResources/Areas/Restricted/Views/Admin/Login.cshtml delete mode 100644 samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/EchoActionUrl.cshtml delete mode 100644 samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/Index.cshtml delete mode 100644 samples/EmbeddedViewSample.Web/EmbeddedViewSample.Web.xproj delete mode 100644 samples/EmbeddedViewSample.Web/Startup.cs delete mode 100644 samples/EmbeddedViewSample.Web/project.json delete mode 100644 samples/EmbeddedViewSample.Web/readme.md delete mode 100644 samples/EmbeddedViewSample.Web/web.config delete mode 100644 samples/FormatFilterSample.Web/Controllers/FormatFilterController.cs delete mode 100644 samples/FormatFilterSample.Web/Controllers/ProducesOverrideClass.cs delete mode 100644 samples/FormatFilterSample.Web/CustomFormatter.cs delete mode 100644 samples/FormatFilterSample.Web/FormatFilterSample.Web.xproj delete mode 100644 samples/FormatFilterSample.Web/Models/Product.cs delete mode 100644 samples/FormatFilterSample.Web/Startup.cs delete mode 100644 samples/FormatFilterSample.Web/project.json delete mode 100644 samples/FormatFilterSample.Web/readme.md delete mode 100644 samples/FormatFilterSample.Web/web.config delete mode 100644 samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme10Constraint.cs delete mode 100644 samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme13Constraint.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/HomeController.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/Isbn10Controller.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/Isbn13Controller.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/ProductsController.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/StoreController.cs delete mode 100644 samples/InlineConstraintSample.Web/Controllers/UsersController.cs delete mode 100644 samples/InlineConstraintSample.Web/InlineConstraintSample.Web.xproj delete mode 100644 samples/InlineConstraintSample.Web/Startup.cs delete mode 100644 samples/InlineConstraintSample.Web/Views/Home/Index.cshtml delete mode 100644 samples/InlineConstraintSample.Web/Views/Shared/Error.cshtml delete mode 100644 samples/InlineConstraintSample.Web/Views/Shared/_Layout.cshtml delete mode 100644 samples/InlineConstraintSample.Web/project.json delete mode 100644 samples/InlineConstraintSample.Web/readme.md delete mode 100644 samples/InlineConstraintSample.Web/web.config delete mode 100644 samples/JsonPatchSample.Web/Controllers/HomeController.cs delete mode 100644 samples/JsonPatchSample.Web/JsonPatchSample.Web.xproj delete mode 100644 samples/JsonPatchSample.Web/Models/Category.cs delete mode 100644 samples/JsonPatchSample.Web/Models/Customer.cs delete mode 100644 samples/JsonPatchSample.Web/Models/Order.cs delete mode 100644 samples/JsonPatchSample.Web/Models/Product.cs delete mode 100644 samples/JsonPatchSample.Web/ProductCategoryConverter.cs delete mode 100644 samples/JsonPatchSample.Web/ReplaceOrderTypeConverter.cs delete mode 100644 samples/JsonPatchSample.Web/Startup.cs delete mode 100644 samples/JsonPatchSample.Web/project.json delete mode 100644 samples/JsonPatchSample.Web/readme.md delete mode 100644 samples/JsonPatchSample.Web/web.config delete mode 100644 samples/LocalizationSample.Web/Controllers/HomeController.cs delete mode 100644 samples/LocalizationSample.Web/LocalizationSample.Web.xproj delete mode 100644 samples/LocalizationSample.Web/Models/Product.cs delete mode 100644 samples/LocalizationSample.Web/Models/User.cs delete mode 100644 samples/LocalizationSample.Web/Resources/Controllers.HomeController.fr.resx delete mode 100644 samples/LocalizationSample.Web/Resources/Models.Product.fr.resx delete mode 100644 samples/LocalizationSample.Web/Resources/Models.User.fr.resx delete mode 100644 samples/LocalizationSample.Web/Resources/Views.Home.Locpage.en-GB.resx delete mode 100644 samples/LocalizationSample.Web/Resources/Views.Home.Locpage.fr.resx delete mode 100644 samples/LocalizationSample.Web/Resources/Views.Shared._LocalizationLayout.fr.resx delete mode 100644 samples/LocalizationSample.Web/Startup.cs delete mode 100644 samples/LocalizationSample.Web/Views/Home/GetInvalidUser.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/Index.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/Index.en-GB.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/Index.fr.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/Locpage.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/_MyPartial.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/_Partial.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Home/_Partial.fr.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Shared/_LocalizationLayout.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Shared/_MyLayout.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Shared/_MyLayout.fr.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/Shared/_MyPartial.en-GB.cshtml delete mode 100644 samples/LocalizationSample.Web/Views/_ViewImports.cshtml delete mode 100644 samples/LocalizationSample.Web/project.json delete mode 100644 samples/LocalizationSample.Web/readme.md delete mode 100644 samples/LocalizationSample.Web/web.config delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Controllers/HomeController.cs delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Views/Home/Index.cshtml delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Controllers/HomeController.cs delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Views/Home/Index.cshtml delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Controllers/HomeController.cs delete mode 100644 samples/MvcSubAreaSample.Web/Areas/Restaurant/Views/Home/Index.cshtml delete mode 100644 samples/MvcSubAreaSample.Web/Controllers/HomeController.cs delete mode 100644 samples/MvcSubAreaSample.Web/MvcSubAreaSample.Web.xproj delete mode 100644 samples/MvcSubAreaSample.Web/Startup.cs delete mode 100644 samples/MvcSubAreaSample.Web/SubAreaAttribute.cs delete mode 100644 samples/MvcSubAreaSample.Web/SubAreaViewLocationExpander.cs delete mode 100644 samples/MvcSubAreaSample.Web/Views/Home/Index.cshtml delete mode 100644 samples/MvcSubAreaSample.Web/Views/Shared/_Layout.cshtml delete mode 100644 samples/MvcSubAreaSample.Web/project.json delete mode 100644 samples/MvcSubAreaSample.Web/web.config delete mode 100644 samples/TagHelperSample.Web/Components/FeaturedMoviesComponent.cs delete mode 100644 samples/TagHelperSample.Web/Components/MoviesComponent.cs delete mode 100644 samples/TagHelperSample.Web/Controllers/HomeController.cs delete mode 100644 samples/TagHelperSample.Web/Controllers/MoviesController.cs delete mode 100644 samples/TagHelperSample.Web/Controllers/TagHelperController.cs delete mode 100644 samples/TagHelperSample.Web/Models/FeaturedMovies.cs delete mode 100644 samples/TagHelperSample.Web/Models/User.cs delete mode 100644 samples/TagHelperSample.Web/Services/MoviesService.cs delete mode 100644 samples/TagHelperSample.Web/Startup.cs delete mode 100644 samples/TagHelperSample.Web/TagHelperSample.Web.xproj delete mode 100644 samples/TagHelperSample.Web/TagHelpers/CommentMode.cs delete mode 100644 samples/TagHelperSample.Web/TagHelpers/ConditionalCommentTagHelper.cs delete mode 100644 samples/TagHelperSample.Web/Views/Home/Create.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/Home/Edit.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/Home/Index.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/Movies/Index.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/Shared/Components/FeaturedMovies/Default.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/Shared/_Layout.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/TagHelper/ConditionalComment.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/_ViewImports.cshtml delete mode 100644 samples/TagHelperSample.Web/Views/_ViewStart.cshtml delete mode 100644 samples/TagHelperSample.Web/appRoot.css delete mode 100644 samples/TagHelperSample.Web/project.json delete mode 100644 samples/TagHelperSample.Web/readme.md delete mode 100644 samples/TagHelperSample.Web/web.config delete mode 100644 samples/TagHelperSample.Web/wwwroot/css/sub/blank.css delete mode 100644 samples/TagHelperSample.Web/wwwroot/fallback.js delete mode 100644 samples/TagHelperSample.Web/wwwroot/original.js delete mode 100644 samples/TagHelperSample.Web/wwwroot/site.css delete mode 100644 samples/UrlHelperSample.Web/AppOptions.cs delete mode 100644 samples/UrlHelperSample.Web/Controllers/HomeController.cs delete mode 100644 samples/UrlHelperSample.Web/Controllers/SimplePocoController.cs delete mode 100644 samples/UrlHelperSample.Web/CustomUrlHelper.cs delete mode 100644 samples/UrlHelperSample.Web/CustomUrlHelperFactory.cs delete mode 100644 samples/UrlHelperSample.Web/Startup.cs delete mode 100644 samples/UrlHelperSample.Web/UrlHelperSample.Web.xproj delete mode 100644 samples/UrlHelperSample.Web/Views/Home/Index.cshtml delete mode 100644 samples/UrlHelperSample.Web/Views/SimplePoco/Index.cshtml delete mode 100644 samples/UrlHelperSample.Web/project.json delete mode 100644 samples/UrlHelperSample.Web/readme.md delete mode 100644 samples/UrlHelperSample.Web/web.config delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/ActionConstraintSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomRouteSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomUrlHelperTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/EmbeddedViewSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/FormatFilterSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/InlineConstraintSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/JsonPatchSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/LocalizationSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/SubAreaTests.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/TagHelperSampleTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index-Reset.html delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index.html delete mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.TagHelper.ConditionalComment.html diff --git a/Mvc.NoFun.sln b/Mvc.NoFun.sln index d72a103394..ebad4df0ec 100644 --- a/Mvc.NoFun.sln +++ b/Mvc.NoFun.sln @@ -39,8 +39,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Te EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.TagHelpers", "src\Microsoft.AspNetCore.Mvc.TagHelpers\Microsoft.AspNetCore.Mvc.TagHelpers.xproj", "{B2347320-308E-4D2B-AEC8-005DFA68B0C9}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TagHelperSample.Web", "samples\TagHelperSample.Web\TagHelperSample.Web.xproj", "{2223120F-D675-40DA-8CD8-11DC14A0B2C7}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.TagHelpers.Test", "test\Microsoft.AspNetCore.Mvc.TagHelpers.Test\Microsoft.AspNetCore.Mvc.TagHelpers.Test.xproj", "{860119ED-3DB1-424D-8D0A-30132A8A7D96}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.TestCommon", "test\Microsoft.AspNetCore.Mvc.TestCommon\Microsoft.AspNetCore.Mvc.TestCommon.xproj", "{F504357E-C2E1-4818-BA5C-9A2EAC25FEE5}" @@ -83,24 +81,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Te EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MvcSandbox", "samples\MvcSandbox\MvcSandbox.xproj", "{14ED4476-9F24-4776-8417-EA6927F6C9C9}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "UrlHelperSample.Web", "samples\UrlHelperSample.Web\UrlHelperSample.Web.xproj", "{73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CustomRouteSample.Web", "samples\CustomRouteSample.Web\CustomRouteSample.Web.xproj", "{364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EmbeddedViewSample.Web", "samples\EmbeddedViewSample.Web\EmbeddedViewSample.Web.xproj", "{B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FormatFilterSample.Web", "samples\FormatFilterSample.Web\FormatFilterSample.Web.xproj", "{AC9BE567-540E-4C70-90C2-AAF021307A80}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "InlineConstraintSample.Web", "samples\InlineConstraintSample.Web\InlineConstraintSample.Web.xproj", "{EA34877F-1AC1-42B7-B4E6-15A093F40CAE}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "JsonPatchSample.Web", "samples\JsonPatchSample.Web\JsonPatchSample.Web.xproj", "{DAB1252D-577C-4912-98BE-1A812BF83F86}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LocalizationSample.Web", "samples\LocalizationSample.Web\LocalizationSample.Web.xproj", "{FCFE6024-2720-49B4-8257-9DBC6114F0F1}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ActionConstraintSample.Web", "samples\ActionConstraintSample.Web\ActionConstraintSample.Web.xproj", "{EE0BD773-4D47-4AA8-8472-5A938A3953BA}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MvcSubAreaSample.Web", "samples\MvcSubAreaSample.Web\MvcSubAreaSample.Web.xproj", "{45F6B3B6-D114-4D77-84D6-561B3957F341}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Dnx", "src\Microsoft.AspNetCore.Mvc.Dnx\Microsoft.AspNetCore.Mvc.Dnx.xproj", "{8FB691C2-DFD8-4FEE-9628-2BB8466A691C}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.Razor.Host.VSRC1", "src\Microsoft.AspNet.Mvc.Razor.Host.VSRC1\Microsoft.AspNet.Mvc.Razor.Host.VSRC1.xproj", "{85C54A84-3E60-40E1-BE39-C2F514DD922E}" @@ -239,18 +219,6 @@ Global {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Release|x86.ActiveCfg = Release|Any CPU {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Release|x86.Build.0 = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|x86.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|x86.Build.0 = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Any CPU.Build.0 = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|x86.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|x86.Build.0 = Release|Any CPU {860119ED-3DB1-424D-8D0A-30132A8A7D96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {860119ED-3DB1-424D-8D0A-30132A8A7D96}.Debug|Any CPU.Build.0 = Debug|Any CPU {860119ED-3DB1-424D-8D0A-30132A8A7D96}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -501,114 +469,6 @@ Global {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|x86.ActiveCfg = Release|Any CPU {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|x86.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|x86.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|x86.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Any CPU.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|x86.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|x86.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|x86.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|x86.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Any CPU.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|x86.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|x86.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|x86.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|x86.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Any CPU.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|x86.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|x86.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|x86.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Any CPU.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|x86.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|x86.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|x86.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|x86.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Any CPU.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|x86.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|x86.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|x86.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|x86.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Any CPU.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|x86.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|x86.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|x86.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|x86.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Any CPU.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|x86.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|x86.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|x86.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|x86.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Any CPU.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|x86.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|x86.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|x86.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|x86.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Any CPU.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|x86.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|x86.Build.0 = Release|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -650,7 +510,6 @@ Global {5DE8E4D9-AACD-4B5F-819F-F091383FB996} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {680D75ED-601F-4D86-B01B-1072D0C31B8C} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {B2347320-308E-4D2B-AEC8-005DFA68B0C9} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} - {2223120F-D675-40DA-8CD8-11DC14A0B2C7} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {860119ED-3DB1-424D-8D0A-30132A8A7D96} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {F504357E-C2E1-4818-BA5C-9A2EAC25FEE5} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {864FA09D-1E48-403A-A6C8-4F079D2A30F0} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} @@ -672,15 +531,6 @@ Global {8FC726B5-E766-44E0-8B38-1313B6D8D9A7} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {9879B5D5-2325-4A81-B4DF-F279FE8FEEB4} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {14ED4476-9F24-4776-8417-EA6927F6C9C9} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {AC9BE567-540E-4C70-90C2-AAF021307A80} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {DAB1252D-577C-4912-98BE-1A812BF83F86} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {FCFE6024-2720-49B4-8257-9DBC6114F0F1} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {EE0BD773-4D47-4AA8-8472-5A938A3953BA} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {45F6B3B6-D114-4D77-84D6-561B3957F341} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {8FB691C2-DFD8-4FEE-9628-2BB8466A691C} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {85C54A84-3E60-40E1-BE39-C2F514DD922E} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} EndGlobalSection diff --git a/Mvc.sln b/Mvc.sln index ff8a96289a..b16c0c357b 100644 --- a/Mvc.sln +++ b/Mvc.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}" EndProject @@ -63,8 +63,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApiCompatShimWebSite", " EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.WebApiCompatShimTest", "test\Microsoft.AspNetCore.Mvc.WebApiCompatShimTest\Microsoft.AspNetCore.Mvc.WebApiCompatShimTest.xproj", "{5DE8E4D9-AACD-4B5F-819F-F091383FB996}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TagHelperSample.Web", "samples\TagHelperSample.Web\TagHelperSample.Web.xproj", "{2223120F-D675-40DA-8CD8-11DC14A0B2C7}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.TagHelpers", "src\Microsoft.AspNetCore.Mvc.TagHelpers\Microsoft.AspNetCore.Mvc.TagHelpers.xproj", "{B2347320-308E-4D2B-AEC8-005DFA68B0C9}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.TagHelpers.Test", "test\Microsoft.AspNetCore.Mvc.TagHelpers.Test\Microsoft.AspNetCore.Mvc.TagHelpers.Test.xproj", "{860119ED-3DB1-424D-8D0A-30132A8A7D96}" @@ -123,26 +121,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Te EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MvcSandbox", "samples\MvcSandbox\MvcSandbox.xproj", "{14ED4476-9F24-4776-8417-EA6927F6C9C9}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "UrlHelperSample.Web", "samples\UrlHelperSample.Web\UrlHelperSample.Web.xproj", "{73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CustomRouteSample.Web", "samples\CustomRouteSample.Web\CustomRouteSample.Web.xproj", "{364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "EmbeddedViewSample.Web", "samples\EmbeddedViewSample.Web\EmbeddedViewSample.Web.xproj", "{B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FormatFilterSample.Web", "samples\FormatFilterSample.Web\FormatFilterSample.Web.xproj", "{AC9BE567-540E-4C70-90C2-AAF021307A80}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "JsonPatchSample.Web", "samples\JsonPatchSample.Web\JsonPatchSample.Web.xproj", "{DAB1252D-577C-4912-98BE-1A812BF83F86}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LocalizationSample.Web", "samples\LocalizationSample.Web\LocalizationSample.Web.xproj", "{FCFE6024-2720-49B4-8257-9DBC6114F0F1}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ActionConstraintSample.Web", "samples\ActionConstraintSample.Web\ActionConstraintSample.Web.xproj", "{EE0BD773-4D47-4AA8-8472-5A938A3953BA}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SimpleWebSite", "test\WebSites\SimpleWebSite\SimpleWebSite.xproj", "{396B40D7-AC70-49A7-B33C-ED42129FEBE3}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "InlineConstraintSample.Web", "samples\InlineConstraintSample.Web\InlineConstraintSample.Web.xproj", "{EA34877F-1AC1-42B7-B4E6-15A093F40CAE}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MvcSubAreaSample.Web", "samples\MvcSubAreaSample.Web\MvcSubAreaSample.Web.xproj", "{45F6B3B6-D114-4D77-84D6-561B3957F341}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Dnx", "src\Microsoft.AspNetCore.Mvc.Dnx\Microsoft.AspNetCore.Mvc.Dnx.xproj", "{8FB691C2-DFD8-4FEE-9628-2BB8466A691C}" EndProject Global @@ -395,16 +375,6 @@ Global {5DE8E4D9-AACD-4B5F-819F-F091383FB996}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {5DE8E4D9-AACD-4B5F-819F-F091383FB996}.Release|Mixed Platforms.Build.0 = Release|Any CPU {5DE8E4D9-AACD-4B5F-819F-F091383FB996}.Release|x86.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Debug|x86.ActiveCfg = Debug|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Any CPU.Build.0 = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2223120F-D675-40DA-8CD8-11DC14A0B2C7}.Release|x86.ActiveCfg = Release|Any CPU {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Debug|Any CPU.Build.0 = Debug|Any CPU {B2347320-308E-4D2B-AEC8-005DFA68B0C9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -748,90 +718,6 @@ Global {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|x86.ActiveCfg = Release|Any CPU {14ED4476-9F24-4776-8417-EA6927F6C9C9}.Release|x86.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|x86.ActiveCfg = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Debug|x86.Build.0 = Debug|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Any CPU.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|x86.ActiveCfg = Release|Any CPU - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191}.Release|x86.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|x86.ActiveCfg = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Debug|x86.Build.0 = Debug|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Any CPU.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|x86.ActiveCfg = Release|Any CPU - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B}.Release|x86.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|x86.ActiveCfg = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Debug|x86.Build.0 = Debug|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Any CPU.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|x86.ActiveCfg = Release|Any CPU - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D}.Release|x86.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Debug|x86.Build.0 = Debug|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Any CPU.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|x86.ActiveCfg = Release|Any CPU - {AC9BE567-540E-4C70-90C2-AAF021307A80}.Release|x86.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|x86.ActiveCfg = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Debug|x86.Build.0 = Debug|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Any CPU.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|x86.ActiveCfg = Release|Any CPU - {DAB1252D-577C-4912-98BE-1A812BF83F86}.Release|x86.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|x86.ActiveCfg = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Debug|x86.Build.0 = Debug|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Any CPU.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|x86.ActiveCfg = Release|Any CPU - {FCFE6024-2720-49B4-8257-9DBC6114F0F1}.Release|x86.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|x86.ActiveCfg = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Debug|x86.Build.0 = Debug|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Any CPU.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|x86.ActiveCfg = Release|Any CPU - {EE0BD773-4D47-4AA8-8472-5A938A3953BA}.Release|x86.Build.0 = Release|Any CPU {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Debug|Any CPU.Build.0 = Debug|Any CPU {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -844,30 +730,6 @@ Global {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Release|x86.ActiveCfg = Release|Any CPU {396B40D7-AC70-49A7-B33C-ED42129FEBE3}.Release|x86.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|x86.ActiveCfg = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Debug|x86.Build.0 = Debug|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Any CPU.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|x86.ActiveCfg = Release|Any CPU - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE}.Release|x86.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|x86.ActiveCfg = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Debug|x86.Build.0 = Debug|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Any CPU.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|x86.ActiveCfg = Release|Any CPU - {45F6B3B6-D114-4D77-84D6-561B3957F341}.Release|x86.Build.0 = Release|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FB691C2-DFD8-4FEE-9628-2BB8466A691C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -910,7 +772,6 @@ Global {23D30B8C-04B1-4577-A604-ED27EA1E4A0E} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {B2B7BC91-688E-4C1E-A71F-CE948D958DDF} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} {5DE8E4D9-AACD-4B5F-819F-F091383FB996} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} - {2223120F-D675-40DA-8CD8-11DC14A0B2C7} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {B2347320-308E-4D2B-AEC8-005DFA68B0C9} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {860119ED-3DB1-424D-8D0A-30132A8A7D96} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {920F8A0E-6F7D-4BBE-84FF-840B89099BE6} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} @@ -940,16 +801,7 @@ Global {8FC726B5-E766-44E0-8B38-1313B6D8D9A7} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {9879B5D5-2325-4A81-B4DF-F279FE8FEEB4} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {14ED4476-9F24-4776-8417-EA6927F6C9C9} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {73F095D2-D0BD-4D03-BC17-D7A5EF0C0191} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {364EC3C6-C9DB-45E0-A0F2-1EE61E4B429B} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {B18ADE62-35DE-4A06-8E1D-EDD6245F7F4D} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {AC9BE567-540E-4C70-90C2-AAF021307A80} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {DAB1252D-577C-4912-98BE-1A812BF83F86} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {FCFE6024-2720-49B4-8257-9DBC6114F0F1} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {EE0BD773-4D47-4AA8-8472-5A938A3953BA} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {396B40D7-AC70-49A7-B33C-ED42129FEBE3} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} - {EA34877F-1AC1-42B7-B4E6-15A093F40CAE} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {45F6B3B6-D114-4D77-84D6-561B3957F341} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {8FB691C2-DFD8-4FEE-9628-2BB8466A691C} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} EndGlobalSection EndGlobal diff --git a/samples/ActionConstraintSample.Web/ActionConstraintSample.Web.xproj b/samples/ActionConstraintSample.Web/ActionConstraintSample.Web.xproj deleted file mode 100644 index 6f5e7847a9..0000000000 --- a/samples/ActionConstraintSample.Web/ActionConstraintSample.Web.xproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - ee0bd773-4d47-4aa8-8472-5a938a3953ba - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - - - - - - - - \ No newline at end of file diff --git a/samples/ActionConstraintSample.Web/Controllers/ItemsController.cs b/samples/ActionConstraintSample.Web/Controllers/ItemsController.cs deleted file mode 100644 index 2e494b2bec..0000000000 --- a/samples/ActionConstraintSample.Web/Controllers/ItemsController.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace ActionConstraintSample.Web.Controllers -{ - public class ItemsController : Controller - { - public IActionResult GetItems() - { - return Content("Hello from everywhere"); - } - } -} \ No newline at end of file diff --git a/samples/ActionConstraintSample.Web/Controllers/US/ItemsController.cs b/samples/ActionConstraintSample.Web/Controllers/US/ItemsController.cs deleted file mode 100644 index 844888d053..0000000000 --- a/samples/ActionConstraintSample.Web/Controllers/US/ItemsController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace ActionConstraintSample.Web.Controllers.US -{ - [CountrySpecific("US")] - public class ItemsController : Controller - { - public IActionResult GetItems() - { - return Content("Hello from US"); - } - } -} \ No newline at end of file diff --git a/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs b/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs deleted file mode 100644 index af192867ae..0000000000 --- a/samples/ActionConstraintSample.Web/CountrySpecificAttribute.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNetCore.Mvc.ActionConstraints; - -namespace ActionConstraintSample.Web -{ - public class CountrySpecificAttribute : Attribute, IActionConstraint - { - private readonly string _countryCode; - - public CountrySpecificAttribute(string countryCode) - { - _countryCode = countryCode; - } - - public int Order - { - get - { - return 0; - } - } - - public bool Accept(ActionConstraintContext context) - { - return string.Equals( - context.RouteContext.RouteData.Values["country"].ToString(), - _countryCode, - StringComparison.OrdinalIgnoreCase); - } - } -} \ No newline at end of file diff --git a/samples/ActionConstraintSample.Web/Startup.cs b/samples/ActionConstraintSample.Web/Startup.cs deleted file mode 100644 index b455038820..0000000000 --- a/samples/ActionConstraintSample.Web/Startup.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; - -namespace ActionConstraintSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseMvc(routes => - { - routes.MapRoute( - "items", - "Items/{country}/{action}", - defaults: new { controller = "Items" }); - routes.MapRoute("default", "{controller}/{action}"); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/ActionConstraintSample.Web/project.json b/samples/ActionConstraintSample.Web/project.json deleted file mode 100644 index dcc287a68c..0000000000 --- a/samples/ActionConstraintSample.Web/project.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/ActionConstraintSample.Web/readme.md b/samples/ActionConstraintSample.Web/readme.md deleted file mode 100644 index b469272c44..0000000000 --- a/samples/ActionConstraintSample.Web/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -ActionConstraintSample.Web -=== - -This web site illustrates how to setup multiple controllers/actions with same name that is selected based on specific route values using IActionConstraint. diff --git a/samples/ActionConstraintSample.Web/web.config b/samples/ActionConstraintSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/ActionConstraintSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/Controllers/Canada/ProductsController.cs b/samples/CustomRouteSample.Web/Controllers/Canada/ProductsController.cs deleted file mode 100644 index 8a89e33ac7..0000000000 --- a/samples/CustomRouteSample.Web/Controllers/Canada/ProductsController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace CustomRouteSample.Web.Controllers.Canada -{ - [Locale("en-CA")] - public class ProductsController : Controller - { - public string Index() - { - return "Hello from Canada."; - } - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/Controllers/OrdersControlller.cs b/samples/CustomRouteSample.Web/Controllers/OrdersControlller.cs deleted file mode 100644 index f820852473..0000000000 --- a/samples/CustomRouteSample.Web/Controllers/OrdersControlller.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace CustomRouteSample.Web.Controllers -{ - public class OrdersControlller : Controller - { - [HttpGet("Orders/{id}")] - public string Index(int id) - { - return "Hello from " + RouteData.Values["locale"] + "."; - } - } -} diff --git a/samples/CustomRouteSample.Web/Controllers/Spain/ProductsController.cs b/samples/CustomRouteSample.Web/Controllers/Spain/ProductsController.cs deleted file mode 100644 index e3a9772f53..0000000000 --- a/samples/CustomRouteSample.Web/Controllers/Spain/ProductsController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace CustomRouteSample.Web.Controllers.Spain -{ - [Locale("es-ES")] - public class ProductsController : Controller - { - public string Index() - { - return "Hola from Spain."; - } - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/Controllers/US/ProductsController.cs b/samples/CustomRouteSample.Web/Controllers/US/ProductsController.cs deleted file mode 100644 index 9f3ab1f21e..0000000000 --- a/samples/CustomRouteSample.Web/Controllers/US/ProductsController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace CustomRouteSample.Web.Controllers.US -{ - [Locale("en-US")] - public class ProductsController : Controller - { - public string Index() - { - return "Hello from the USA."; - } - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/CustomRouteSample.Web.xproj b/samples/CustomRouteSample.Web/CustomRouteSample.Web.xproj deleted file mode 100644 index 77efb7c1db..0000000000 --- a/samples/CustomRouteSample.Web/CustomRouteSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 364ec3c6-c9db-45e0-a0f2-1ee61e4b429b - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 4095 - - - \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/LocaleAttribute.cs b/samples/CustomRouteSample.Web/LocaleAttribute.cs deleted file mode 100644 index bf3cb0af0d..0000000000 --- a/samples/CustomRouteSample.Web/LocaleAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc.Routing; - -namespace CustomRouteSample.Web -{ - public class LocaleAttribute : RouteValueAttribute - { - public LocaleAttribute(string locale) - : base("locale", routeValue: locale) - { - } - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/LocalizedRoute.cs b/samples/CustomRouteSample.Web/LocalizedRoute.cs deleted file mode 100644 index 6fc98fb260..0000000000 --- a/samples/CustomRouteSample.Web/LocalizedRoute.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; - -namespace CustomRouteSample.Web -{ - public class LocalizedRoute : IRouter - { - private readonly IRouter _next; - - private readonly Dictionary _users = new Dictionary(StringComparer.Ordinal) - { - { "Javier", "es-ES" }, - { "Doug", "en-CA" }, - }; - - public LocalizedRoute(IRouter next) - { - _next = next; - } - - public VirtualPathData GetVirtualPath(VirtualPathContext context) - { - // We just want to act as a pass-through for link generation - return _next.GetVirtualPath(context); - } - - public async Task RouteAsync(RouteContext context) - { - context.RouteData.Routers.Add(_next); - - var locale = GetLocale(context.HttpContext) ?? "en-US"; - context.RouteData.Values.Add("locale", locale); - - await _next.RouteAsync(context); - } - - private string GetLocale(HttpContext context) - { - string locale; - _users.TryGetValue(context.Request.Headers["User"], out locale); - return locale; - } - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/Startup.cs b/samples/CustomRouteSample.Web/Startup.cs deleted file mode 100644 index 76dbd36788..0000000000 --- a/samples/CustomRouteSample.Web/Startup.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; - -namespace CustomRouteSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseMvc(routes => - { - routes.DefaultHandler = new LocalizedRoute(routes.DefaultHandler); - routes.MapRoute("default", "{controller}/{action}"); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/CustomRouteSample.Web/project.json b/samples/CustomRouteSample.Web/project.json deleted file mode 100644 index dcc287a68c..0000000000 --- a/samples/CustomRouteSample.Web/project.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/CustomRouteSample.Web/readme.md b/samples/CustomRouteSample.Web/readme.md deleted file mode 100644 index 857209b1aa..0000000000 --- a/samples/CustomRouteSample.Web/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -CustomRouteSample.Web -=== - -This web site illustrates how a custom route injects route data based on a "User" header. diff --git a/samples/CustomRouteSample.Web/web.config b/samples/CustomRouteSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/CustomRouteSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/Controllers/AdminController.cs b/samples/EmbeddedViewSample.Web/Controllers/AdminController.cs deleted file mode 100644 index 0baec4a36d..0000000000 --- a/samples/EmbeddedViewSample.Web/Controllers/AdminController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace EmbeddedViewSample.Web.Controllers -{ - [Area("Restricted")] - public class AdminController : Controller - { - public IActionResult Login() - { - return View(); - } - } -} \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/Controllers/HomeController.cs b/samples/EmbeddedViewSample.Web/Controllers/HomeController.cs deleted file mode 100644 index fe32363d9a..0000000000 --- a/samples/EmbeddedViewSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace EmbeddedViewSample.Web -{ - public class HomeController : Controller - { - // Interactive home page. - public IActionResult Index() - { - return View(); - } - - public IActionResult EchoActionUrl() - { - return View(); - } - } -} \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/EmbeddedResources/Areas/Restricted/Views/Admin/Login.cshtml b/samples/EmbeddedViewSample.Web/EmbeddedResources/Areas/Restricted/Views/Admin/Login.cshtml deleted file mode 100644 index c6ea238bbf..0000000000 --- a/samples/EmbeddedViewSample.Web/EmbeddedResources/Areas/Restricted/Views/Admin/Login.cshtml +++ /dev/null @@ -1 +0,0 @@ -Hello @Context.Request.Query["AdminUser"], this is @Url.Action() \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/EchoActionUrl.cshtml b/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/EchoActionUrl.cshtml deleted file mode 100644 index b673b5ff88..0000000000 --- a/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/EchoActionUrl.cshtml +++ /dev/null @@ -1 +0,0 @@ -Hello @Context.Request.Query["User"], this is @Url.Action() \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/Index.cshtml b/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/Index.cshtml deleted file mode 100644 index facd4356e0..0000000000 --- a/samples/EmbeddedViewSample.Web/EmbeddedResources/Views/Home/Index.cshtml +++ /dev/null @@ -1,13 +0,0 @@ - - Home page - -
    -
  • @Html.ActionLink( - linkText: "Administrator login", - actionName: "Login", - controllerName: "Admin", - routeValues: new { area = "Restricted" })
  • -
  • @Html.ActionLink(linkText: "Echo action", actionName: "EchoActionUrl")
  • -
- - \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/EmbeddedViewSample.Web.xproj b/samples/EmbeddedViewSample.Web/EmbeddedViewSample.Web.xproj deleted file mode 100644 index 1478b64453..0000000000 --- a/samples/EmbeddedViewSample.Web/EmbeddedViewSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - b18ade62-35de-4a06-8e1d-edd6245f7f4d - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 53986 - - - \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/Startup.cs b/samples/EmbeddedViewSample.Web/Startup.cs deleted file mode 100644 index cdce52491e..0000000000 --- a/samples/EmbeddedViewSample.Web/Startup.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using System.Reflection; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Razor; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.FileProviders; - -namespace EmbeddedViewSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - // Add MVC services to the services container - services.AddMvc(); - - services.Configure(options => - { - options.FileProviders.Clear(); - - // Base namespace matches the resources added to the assembly from the EmbeddedResources folder. - options.FileProviders.Add(new EmbeddedFileProvider( - GetType().GetTypeInfo().Assembly, - baseNamespace: "EmbeddedViewSample.Web.EmbeddedResources")); - }); - } - - public void Configure(IApplicationBuilder app) - { - app.UseMvc(routes => - { - routes.MapRoute("areaRoute", "{area:exists}/{controller}/{action}"); - routes.MapRoute( - "default", - "{controller}/{action}/{id?}", - new { controller = "Home", action = "Index" }); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/EmbeddedViewSample.Web/project.json b/samples/EmbeddedViewSample.Web/project.json deleted file mode 100644 index 9d088a44f2..0000000000 --- a/samples/EmbeddedViewSample.Web/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "resource": "EmbeddedResources/**", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.Extensions.FileProviders.Embedded": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/EmbeddedViewSample.Web/readme.md b/samples/EmbeddedViewSample.Web/readme.md deleted file mode 100644 index 49ec6495da..0000000000 --- a/samples/EmbeddedViewSample.Web/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -EmbeddedViewSample.Web -=== - -This web site illustrates use cases for `RazorViewEngineOptions.FileProvider`. diff --git a/samples/EmbeddedViewSample.Web/web.config b/samples/EmbeddedViewSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/EmbeddedViewSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/Controllers/FormatFilterController.cs b/samples/FormatFilterSample.Web/Controllers/FormatFilterController.cs deleted file mode 100644 index 27c86ce138..0000000000 --- a/samples/FormatFilterSample.Web/Controllers/FormatFilterController.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace FormatFilterSample.Web -{ - [FormatFilter] - public class FormatFilterController : Controller - { - [Route("[controller]/[action]/{id}.{format?}")] - [Route("[controller]/[action].{format}")] - public Product GetProduct(int id = 0) - { - return new Product() { SampleInt = id }; - } - - [Produces("application/custom", "application/json", "text/json")] - [Route("[controller]/[action]/{id}.{format}")] - public Product ProducesMethod(int id) - { - return new Product() { SampleInt = id }; - } - } -} \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/Controllers/ProducesOverrideClass.cs b/samples/FormatFilterSample.Web/Controllers/ProducesOverrideClass.cs deleted file mode 100644 index 3aab441981..0000000000 --- a/samples/FormatFilterSample.Web/Controllers/ProducesOverrideClass.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace FormatFilterSample.Web -{ - [Produces("application/controller")] - [Route("[controller]/[action]")] - public class ProducesOverrideController - { - [Produces("application/custom")] - public string ReturnClassName() - { - return "ProducesOverrideController"; - } - } -} \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/CustomFormatter.cs b/samples/FormatFilterSample.Web/CustomFormatter.cs deleted file mode 100644 index 1e6a477a25..0000000000 --- a/samples/FormatFilterSample.Web/CustomFormatter.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.Net.Http.Headers; - -namespace FormatFilterSample.Web -{ - public class CustomFormatter : TextOutputFormatter - { - public CustomFormatter(string contentType) - { - ContentType = contentType; - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(contentType)); - SupportedEncodings.Add(Encoding.GetEncoding("utf-8")); - } - - public string ContentType { get; } - - public override bool CanWriteResult(OutputFormatterCanWriteContext context) - { - if (base.CanWriteResult(context)) - { - if (context.Object is Product) - { - return true; - } - - if (context.Object is string) - { - return true; - } - } - - return false; - } - - public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) - { - var response = context.HttpContext.Response; - await response.WriteAsync(context.Object.ToString()); - } - } -} \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/FormatFilterSample.Web.xproj b/samples/FormatFilterSample.Web/FormatFilterSample.Web.xproj deleted file mode 100644 index d88ab3e809..0000000000 --- a/samples/FormatFilterSample.Web/FormatFilterSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - ac9be567-540e-4c70-90c2-aaf021307a80 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 51135 - - - \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/Models/Product.cs b/samples/FormatFilterSample.Web/Models/Product.cs deleted file mode 100644 index 034e8ea58d..0000000000 --- a/samples/FormatFilterSample.Web/Models/Product.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace FormatFilterSample.Web -{ - public class Product - { - public int SampleInt { get; set; } - - public override string ToString() - { - return "SampleInt:" + SampleInt; - } - } -} \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/Startup.cs b/samples/FormatFilterSample.Web/Startup.cs deleted file mode 100644 index 2afd4f1e7e..0000000000 --- a/samples/FormatFilterSample.Web/Startup.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Net.Http.Headers; - -namespace FormatFilterSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - var mvcBuilder = services.AddMvc(options => - { - var formatFilter = new FormatFilterAttribute(); - options.Filters.Add(formatFilter); - - var customFormatter = new CustomFormatter("application/custom"); - options.OutputFormatters.Add(customFormatter); - options.OutputFormatters.RemoveType(); - - options.FormatterMappings.SetMediaTypeMappingForFormat( - "custom", - MediaTypeHeaderValue.Parse("application/custom")); - }); - - mvcBuilder.AddXmlDataContractSerializerFormatters(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseMvc(); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/samples/FormatFilterSample.Web/project.json b/samples/FormatFilterSample.Web/project.json deleted file mode 100644 index f674e6d9f1..0000000000 --- a/samples/FormatFilterSample.Web/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/FormatFilterSample.Web/readme.md b/samples/FormatFilterSample.Web/readme.md deleted file mode 100644 index 4aaf176a2a..0000000000 --- a/samples/FormatFilterSample.Web/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -FormatFilterSample.Web -=== - -This web site illustrates in depth the process of using new feature URL Media header mappings. It demonstrates adding -URL formats and content type mappings and using them. It also shows how routes need to change for this feature to work. diff --git a/samples/FormatFilterSample.Web/web.config b/samples/FormatFilterSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/FormatFilterSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme10Constraint.cs b/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme10Constraint.cs deleted file mode 100644 index 26a68ef656..0000000000 --- a/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme10Constraint.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Linq; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; - -namespace InlineConstraintSample.Web.Constraints -{ - public class IsbnDigitScheme10Constraint : IRouteConstraint - { - private readonly bool _allowDashes; - - public IsbnDigitScheme10Constraint(bool allowDashes) - { - _allowDashes = allowDashes; - } - - public bool Match( - HttpContext httpContext, - IRouter route, - string routeKey, - RouteValueDictionary values, - RouteDirection routeDirection) - { - object value; - - if (!values.TryGetValue(routeKey, out value)) - { - return false; - } - - var inputString = value as string; - string isbnNumber; - - if (inputString == null - || !TryGetIsbn10(inputString, _allowDashes, out isbnNumber)) - { - return false; - } - - var sum = 0; - Func convertToInt = (char n) => n - '0'; - - for (int i = 0; i < isbnNumber.Length - 1; ++i) - { - sum += convertToInt(isbnNumber[i]) * (i + 1); - } - - var checkSum = sum % 11; - var lastDigit = isbnNumber.Last(); - - if (checkSum == 10) - { - return char.ToUpperInvariant(lastDigit) == 'X'; - } - else - { - return checkSum == convertToInt(lastDigit); - } - } - - private static bool TryGetIsbn10(string value, bool allowDashes, out string isbnNumber) - { - if (!allowDashes) - { - if (CheckIsbn10Characters(value)) - { - isbnNumber = value; - return true; - } - else - { - isbnNumber = null; - return false; - } - } - - var isbnParts = value.Split( - new char[] { '-' }, - StringSplitOptions.RemoveEmptyEntries); - - if (isbnParts.Length == 4) - { - value = value.Replace("-", string.Empty); - if (CheckIsbn10Characters(value)) - { - isbnNumber = value; - return true; - } - } - - isbnNumber = null; - return false; - } - - private static bool CheckIsbn10Characters(string value) - { - if (value.Length != 10) - { - return false; - } - - var digits = value.Substring(0, 9); - var checksum = value.Last(); - - return digits.All(n => '0' <= n && n <= '9') - && ('0' <= checksum && checksum <= '9' - || 'X' == char.ToUpperInvariant(checksum)); - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme13Constraint.cs b/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme13Constraint.cs deleted file mode 100644 index c7647462cc..0000000000 --- a/samples/InlineConstraintSample.Web/Constraints/IsbnDigitScheme13Constraint.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Linq; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; - -namespace InlineConstraintSample.Web.Constraints -{ - public class IsbnDigitScheme13Constraint : IRouteConstraint - { - private static readonly int[] _isbn13Weights = new int[] { 1, 3 }; - - public bool Match( - HttpContext httpContext, - IRouter route, - string routeKey, - RouteValueDictionary values, - RouteDirection routeDirection) - { - object value; - - if (!values.TryGetValue(routeKey, out value)) - { - return false; - } - - var isbnNumber = value as string; - - if (isbnNumber == null - || isbnNumber.Length != 13 - || isbnNumber.Any(n => n < '0' || n > '9')) - { - return false; - } - - var sum = 0; - Func convertToInt = (char n) => n - '0'; - - for (int i = 0; i < isbnNumber.Length - 1; ++i) - { - sum += - convertToInt(isbnNumber[i]) * _isbn13Weights[i % 2]; - } - - var checkSum = 10 - sum % 10; - - if (checkSum == convertToInt(isbnNumber.Last())) - { - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/HomeController.cs b/samples/InlineConstraintSample.Web/Controllers/HomeController.cs deleted file mode 100644 index 5d5e906fde..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - public class HomeController : Controller - { - [Route("")] - [Route("[controller]")] - [Route("[controller]/[action]")] - public IActionResult Index() - { - return View(); - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/Isbn10Controller.cs b/samples/InlineConstraintSample.Web/Controllers/Isbn10Controller.cs deleted file mode 100644 index 26ff0f0f36..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/Isbn10Controller.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - public class Isbn10Controller : Controller - { - [Route("book/[action]/{isbnNumber:IsbnDigitScheme10(true)}")] - public string Index(string isbnNumber) - { - return "10 Digit ISBN Number " + isbnNumber; - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/Isbn13Controller.cs b/samples/InlineConstraintSample.Web/Controllers/Isbn13Controller.cs deleted file mode 100644 index ad267592df..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/Isbn13Controller.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - [Route("book/[action]")] - public class Isbn13Controller : Controller - { - [HttpGet("{isbnNumber:IsbnDigitScheme13}")] - public string Index(string isbnNumber) - { - return "13 Digit ISBN Number " + isbnNumber; - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/ProductsController.cs b/samples/InlineConstraintSample.Web/Controllers/ProductsController.cs deleted file mode 100644 index 5447b13cec..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/ProductsController.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Linq; -using Microsoft.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - [Route("products/[action]")] - public class ProductsController : Controller - { - public IDictionary Index() - { - return RouteData.Values; - } - - [HttpGet("{id:int?}")] - public IDictionary GetProductById(int id) - { - return RouteData.Values; - } - - [HttpGet("{name:alpha}")] - public IDictionary GetProductByName(string name) - { - return RouteData.Values; - } - - [HttpGet("{dateTime:datetime}")] - public IDictionary GetProductByManufacturingDate(DateTime dateTime) - { - return RouteData.Values; - } - - [HttpGet("{name:length(1,20)?}")] - public IDictionary GetProductByCategoryName(string name) - { - return RouteData.Values; - } - - [HttpGet("{catId:int:range(10, 100)}")] - public IDictionary GetProductByCategoryId(int catId) - { - return RouteData.Values; - } - - [HttpGet("{price:float?}")] - public IDictionary GetProductByPrice(float price) - { - return RouteData.Values; - } - - [HttpGet("{manId:int:min(10)?}")] - public IDictionary GetProductByManufacturerId(int manId) - { - return RouteData.Values; - } - - [HttpGet(@"{name:regex(^abc$)}")] - public IDictionary GetUserByName(string name) - { - return RouteData.Values; - } - - public string GetGeneratedLink() - { - var query = HttpContext.Request.Query; - var values = query - .Where(kvp => kvp.Key != "newAction" && kvp.Key != "newController") - .ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value[0]); - - return Url.Action(query["newAction"], query["newController"], values); - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/StoreController.cs b/samples/InlineConstraintSample.Web/Controllers/StoreController.cs deleted file mode 100644 index 8a31bc5542..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/StoreController.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) .NET Foundation. 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.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - public class StoreController : Controller - { - [Route("store/[action]/{id:guid?}")] - public IDictionary GetStoreById(Guid id) - { - return RouteData.Values; - } - - [Route("store/[action]/{location:alpha:minlength(3):maxlength(10)}")] - public IDictionary GetStoreByLocation(string location) - { - return RouteData.Values; - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Controllers/UsersController.cs b/samples/InlineConstraintSample.Web/Controllers/UsersController.cs deleted file mode 100644 index 76f9e78cfa..0000000000 --- a/samples/InlineConstraintSample.Web/Controllers/UsersController.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace InlineConstraintSample.Web.Controllers -{ - public class UsersController : Controller - { - [Route("constant-prefix/[controller]")] - public IActionResult Index() - { - return Content("Users.Index"); - } - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/InlineConstraintSample.Web.xproj b/samples/InlineConstraintSample.Web/InlineConstraintSample.Web.xproj deleted file mode 100644 index 9561d06369..0000000000 --- a/samples/InlineConstraintSample.Web/InlineConstraintSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - ea34877f-1ac1-42b7-b4e6-15a093f40cae - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 45283 - - - \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Startup.cs b/samples/InlineConstraintSample.Web/Startup.cs deleted file mode 100644 index 54c692aba1..0000000000 --- a/samples/InlineConstraintSample.Web/Startup.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.IO; -using InlineConstraintSample.Web.Constraints; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Localization; -using Microsoft.Extensions.DependencyInjection; - -namespace InlineConstraintSample.Web -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services.AddRouting(routeOptions => - { - routeOptions.ConstraintMap.Add("IsbnDigitScheme10", typeof(IsbnDigitScheme10Constraint)); - routeOptions.ConstraintMap.Add("IsbnDigitScheme13", typeof(IsbnDigitScheme13Constraint)); - }); - - // Add MVC services to the services container - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseRequestLocalization(new RequestLocalizationOptions - { - // Ignore ambient and client locale. Use same values as ReplaceCultureAttribute / CultureReplacerMiddleware. - DefaultRequestCulture = new RequestCulture("en-GB", "en-US"), - RequestCultureProviders = new List() - }); - - app.UseMvc(); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/InlineConstraintSample.Web/Views/Home/Index.cshtml b/samples/InlineConstraintSample.Web/Views/Home/Index.cshtml deleted file mode 100644 index 11137a53dc..0000000000 --- a/samples/InlineConstraintSample.Web/Views/Home/Index.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - Layout = "/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "Inline Constraints Home Page"; -} - -
-

ASP.NET vNext

-
\ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Views/Shared/Error.cshtml b/samples/InlineConstraintSample.Web/Views/Shared/Error.cshtml deleted file mode 100644 index 5d73bf597b..0000000000 --- a/samples/InlineConstraintSample.Web/Views/Shared/Error.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@{ - Layout = "/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "Error"; -} - -

Error.

-

An error occurred while processing your request.

\ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/Views/Shared/_Layout.cshtml b/samples/InlineConstraintSample.Web/Views/Shared/_Layout.cshtml deleted file mode 100644 index 73698bac3e..0000000000 --- a/samples/InlineConstraintSample.Web/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - @ViewBag.Title - My ASP.NET Application - - - -
-
-
- @Html.ActionLink("InlineConstraintsWebApplication", "Index", "Home", new { area = "" }) -
-
-
    -
  • @Html.ActionLink("Home", "Index", "Home")
  • -
-
-
-
-
- @RenderBody() -
-
-

© 2014 - My ASP.NET Application

-
-
- - \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/project.json b/samples/InlineConstraintSample.Web/project.json deleted file mode 100644 index 6176d0634a..0000000000 --- a/samples/InlineConstraintSample.Web/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "Views", - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/InlineConstraintSample.Web/readme.md b/samples/InlineConstraintSample.Web/readme.md deleted file mode 100644 index 4c9f106fac..0000000000 --- a/samples/InlineConstraintSample.Web/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -InlineConstraintSample.Web -=== - -This web site illustrates how to use inline route constraints with traditional -routes. The startup class in its configure method reads the routes which are added to configuration by the -test methods. diff --git a/samples/InlineConstraintSample.Web/web.config b/samples/InlineConstraintSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/InlineConstraintSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/JsonPatchSample.Web/Controllers/HomeController.cs b/samples/JsonPatchSample.Web/Controllers/HomeController.cs deleted file mode 100644 index e5f1febdd5..0000000000 --- a/samples/JsonPatchSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using JsonPatchSample.Web.Models; -using Microsoft.AspNetCore.JsonPatch; -using Microsoft.AspNetCore.Mvc; - -namespace JsonPatchSample.Web.Controllers -{ - [Route("jsonpatch/[action]")] - public class HomeController : Controller - { - [HttpPatch] - public IActionResult JsonPatchWithModelState([FromBody] JsonPatchDocument patchDoc) - { - if (patchDoc != null) - { - var customer = CreateCustomer(); - - patchDoc.ApplyTo(customer, ModelState); - - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - return new ObjectResult(customer); - } - else - { - return BadRequest(ModelState); - } - } - - [HttpPatch] - public IActionResult JsonPatchWithModelStateAndPrefix( - [FromBody] JsonPatchDocument patchDoc, - string prefix) - { - var customer = CreateCustomer(); - - patchDoc.ApplyTo(customer, ModelState, prefix); - - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - return new ObjectResult(customer); - } - - [HttpPatch] - public IActionResult JsonPatchWithoutModelState([FromBody] JsonPatchDocument patchDoc) - { - var customer = CreateCustomer(); - - patchDoc.ApplyTo(customer); - - return new ObjectResult(customer); - } - - [HttpPatch] - public IActionResult JsonPatchForProduct([FromBody] JsonPatchDocument patchDoc) - { - var product = new Product(); - - patchDoc.ApplyTo(product); - - return new ObjectResult(product); - } - - private Customer CreateCustomer() - { - return new Customer - { - CustomerName = "John", - Orders = new List() - { - new Order - { - OrderName = "Order0" - }, - new Order - { - OrderName = "Order1" - } - } - }; - } - } -} diff --git a/samples/JsonPatchSample.Web/JsonPatchSample.Web.xproj b/samples/JsonPatchSample.Web/JsonPatchSample.Web.xproj deleted file mode 100644 index e7239f240c..0000000000 --- a/samples/JsonPatchSample.Web/JsonPatchSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - dab1252d-577c-4912-98be-1a812bf83f86 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 29149 - - - \ No newline at end of file diff --git a/samples/JsonPatchSample.Web/Models/Category.cs b/samples/JsonPatchSample.Web/Models/Category.cs deleted file mode 100644 index ac3a3b3fae..0000000000 --- a/samples/JsonPatchSample.Web/Models/Category.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Newtonsoft.Json; - -namespace JsonPatchSample.Web.Models -{ - [JsonConverter(typeof(ProductCategoryConverter))] - public class Category - { - public string CategoryName { get; set; } - } -} diff --git a/samples/JsonPatchSample.Web/Models/Customer.cs b/samples/JsonPatchSample.Web/Models/Customer.cs deleted file mode 100644 index a1c8305291..0000000000 --- a/samples/JsonPatchSample.Web/Models/Customer.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; - -namespace JsonPatchSample.Web.Models -{ - public class Customer - { - public string CustomerName { get; set; } - - public List Orders { get; set; } - } -} \ No newline at end of file diff --git a/samples/JsonPatchSample.Web/Models/Order.cs b/samples/JsonPatchSample.Web/Models/Order.cs deleted file mode 100644 index d35b358838..0000000000 --- a/samples/JsonPatchSample.Web/Models/Order.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Newtonsoft.Json; - -namespace JsonPatchSample.Web.Models -{ - public class Order - { - public string OrderName { get; set; } - - [JsonConverter(typeof(ReplaceOrderTypeConverter))] - public string OrderType { get; set; } - } -} \ No newline at end of file diff --git a/samples/JsonPatchSample.Web/Models/Product.cs b/samples/JsonPatchSample.Web/Models/Product.cs deleted file mode 100644 index a3453206bc..0000000000 --- a/samples/JsonPatchSample.Web/Models/Product.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace JsonPatchSample.Web.Models -{ - public class Product - { - public string ProductName { get; set; } - - public Category ProductCategory { get; set; } - } -} diff --git a/samples/JsonPatchSample.Web/ProductCategoryConverter.cs b/samples/JsonPatchSample.Web/ProductCategoryConverter.cs deleted file mode 100644 index 1135d1433f..0000000000 --- a/samples/JsonPatchSample.Web/ProductCategoryConverter.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) .NET Foundation. 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.Reflection; -using JsonPatchSample.Web.Models; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace JsonPatchSample.Web -{ - public class ProductCategoryConverter : JsonConverter - { - public override bool CanConvert(Type objectType) - { - return true; - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - // Load has to happen even if we are not using it. If removed, deserialization will throw an error - - //"Additional text found in JSON string after finishing deserializing object." - var obj = JObject.Load(reader); - - var category = new Category(); - category.CategoryName = "CategorySetInConverter"; - - return category; - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - var jo = new JObject(); - - foreach (var property in value.GetType().GetProperties()) - { - if (property.CanRead) - { - var propertyValue = property.GetValue(value); - if (propertyValue != null) - { - jo.Add(property.Name, JToken.FromObject(propertyValue, serializer)); - } - } - } - - jo.WriteTo(writer); - } - } -} diff --git a/samples/JsonPatchSample.Web/ReplaceOrderTypeConverter.cs b/samples/JsonPatchSample.Web/ReplaceOrderTypeConverter.cs deleted file mode 100644 index ea040b7d33..0000000000 --- a/samples/JsonPatchSample.Web/ReplaceOrderTypeConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Newtonsoft.Json; - -namespace JsonPatchSample.Web -{ - public class ReplaceOrderTypeConverter : JsonConverter - { - public override bool CanConvert(Type objectType) - { - return true; - } - - public override object ReadJson( - JsonReader reader, - Type objectType, - object existingValue, JsonSerializer serializer) - { - return "OrderTypeSetInConverter"; - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - serializer.Serialize(writer, value); - } - } -} diff --git a/samples/JsonPatchSample.Web/Startup.cs b/samples/JsonPatchSample.Web/Startup.cs deleted file mode 100644 index 73d7abc599..0000000000 --- a/samples/JsonPatchSample.Web/Startup.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; - -namespace JsonPatchSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - // Add MVC services to the services container - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app) - { - // Add MVC to the request pipeline - app.UseMvc(); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/JsonPatchSample.Web/project.json b/samples/JsonPatchSample.Web/project.json deleted file mode 100644 index 81505cbad2..0000000000 --- a/samples/JsonPatchSample.Web/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "wwwroot", - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/JsonPatchSample.Web/readme.md b/samples/JsonPatchSample.Web/readme.md deleted file mode 100644 index 0d37c5b539..0000000000 --- a/samples/JsonPatchSample.Web/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -JsonPatchSample.Web -=== - -This web site illustrates how to use JSON Patch operation on an object. diff --git a/samples/JsonPatchSample.Web/web.config b/samples/JsonPatchSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/JsonPatchSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Controllers/HomeController.cs b/samples/LocalizationSample.Web/Controllers/HomeController.cs deleted file mode 100644 index c93c89038b..0000000000 --- a/samples/LocalizationSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using LocalizationSample.Web.Models; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Localization; - -namespace LocalizationSample.Web.Controllers -{ - public class HomeController : Controller - { - private readonly IHtmlLocalizer _localizer; - - public HomeController(IHtmlLocalizer localizer) - { - _localizer = localizer; - } - - public IActionResult Index() - { - return View(); - } - - public IActionResult Locpage() - { - ViewData["Message"] = _localizer["Learn More"]; - return View(); - } - - public IActionResult GetInvalidUser() - { - var user = new User - { - Name = "A", - Product = new Product() - }; - - TryValidateModel(user); - return View(user); - } - } -} diff --git a/samples/LocalizationSample.Web/LocalizationSample.Web.xproj b/samples/LocalizationSample.Web/LocalizationSample.Web.xproj deleted file mode 100644 index cc428e58fe..0000000000 --- a/samples/LocalizationSample.Web/LocalizationSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - fcfe6024-2720-49b4-8257-9dbc6114f0f1 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 17721 - - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Models/Product.cs b/samples/LocalizationSample.Web/Models/Product.cs deleted file mode 100644 index 49217992b7..0000000000 --- a/samples/LocalizationSample.Web/Models/Product.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.ComponentModel.DataAnnotations; - -namespace LocalizationSample.Web.Models -{ - public class Product - { - [Required(ErrorMessage = "ProductName")] - public string ProductName { get; set; } - } -} diff --git a/samples/LocalizationSample.Web/Models/User.cs b/samples/LocalizationSample.Web/Models/User.cs deleted file mode 100644 index 93c64408ad..0000000000 --- a/samples/LocalizationSample.Web/Models/User.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.ComponentModel.DataAnnotations; - -namespace LocalizationSample.Web.Models -{ - public class User - { - [MinLength(6, ErrorMessage = "NameError")] - public string Name { get; set; } - - public Product Product { get; set; } - } -} diff --git a/samples/LocalizationSample.Web/Resources/Controllers.HomeController.fr.resx b/samples/LocalizationSample.Web/Resources/Controllers.HomeController.fr.resx deleted file mode 100644 index 70dd8d4706..0000000000 --- a/samples/LocalizationSample.Web/Resources/Controllers.HomeController.fr.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Bonjour! - - - Apprenez à créer des applications ASP.NET qui peuvent fonctionner ne importe où. - - - apprendre Encore Plus - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Resources/Models.Product.fr.resx b/samples/LocalizationSample.Web/Resources/Models.Product.fr.resx deleted file mode 100644 index 0046bc487a..0000000000 --- a/samples/LocalizationSample.Web/Resources/Models.Product.fr.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Nom du produit est invalide - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Resources/Models.User.fr.resx b/samples/LocalizationSample.Web/Resources/Models.User.fr.resx deleted file mode 100644 index 444a07866f..0000000000 --- a/samples/LocalizationSample.Web/Resources/Models.User.fr.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Nom non valide. Longueur minimale de nom est {1} - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.en-GB.resx b/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.en-GB.resx deleted file mode 100644 index e41ff10213..0000000000 --- a/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.en-GB.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Hello there!! - - - Learn how to build ASP.NET apps that can run anywhere. - - - Learn More - - - Hi {0,-10}! You are in {1:yyyy} year and today is {2} - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.fr.resx b/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.fr.resx deleted file mode 100644 index 1ae6682e18..0000000000 --- a/samples/LocalizationSample.Web/Resources/Views.Home.Locpage.fr.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Bonjour! - - - Apprenez à créer des applications ASP.NET qui peuvent fonctionner ne importe où. - - - apprendre Encore Plus - - - Salut {0,-10}! Vous êtes en {1:yyyy} an aujourd'hui est {2} - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Resources/Views.Shared._LocalizationLayout.fr.resx b/samples/LocalizationSample.Web/Resources/Views.Shared._LocalizationLayout.fr.resx deleted file mode 100644 index fa0e1a299e..0000000000 --- a/samples/LocalizationSample.Web/Resources/Views.Shared._LocalizationLayout.fr.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - sur - - - Nom de l'application - - - communiquer - - - maison - - - Mon application ASP.NET - - - Ressources pour ce point de vue - - - Aujourd'hui, ce est: {0} - - \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Startup.cs b/samples/LocalizationSample.Web/Startup.cs deleted file mode 100644 index 6016f67009..0000000000 --- a/samples/LocalizationSample.Web/Startup.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Localization; -using Microsoft.Extensions.DependencyInjection; - -namespace LocalizationSample.Web -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services - .AddMvc() - .AddViewLocalization(options => options.ResourcesPath = "Resources") - .AddDataAnnotationsLocalization(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseRequestLocalization(new RequestLocalizationOptions - { - DefaultRequestCulture = new RequestCulture("en-US"), - SupportedCultures = new List - { - new CultureInfo("fr"), - new CultureInfo("en-GB"), - }, - SupportedUICultures = new List - { - new CultureInfo("fr"), - new CultureInfo("en-GB"), - } - }); - - app.UseMvcWithDefaultRoute(); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/LocalizationSample.Web/Views/Home/GetInvalidUser.cshtml b/samples/LocalizationSample.Web/Views/Home/GetInvalidUser.cshtml deleted file mode 100644 index 5269a7aaed..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/GetInvalidUser.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@model LocalizationSample.Web.Models.User - -@Html.ValidationMessage("Name") -@Html.ValidationMessage("Product.ProductName") -@Html.EditorForModel() -@Html.EditorFor(model => model.Product) - - diff --git a/samples/LocalizationSample.Web/Views/Home/Index.cshtml b/samples/LocalizationSample.Web/Views/Home/Index.cshtml deleted file mode 100644 index 6cddb0922d..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/Index.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - Layout = "_MyLayout"; -} -index -@await Html.PartialAsync("_Partial") -@await Html.PartialAsync("_MyPartial") diff --git a/samples/LocalizationSample.Web/Views/Home/Index.en-GB.cshtml b/samples/LocalizationSample.Web/Views/Home/Index.en-GB.cshtml deleted file mode 100644 index b622ef3293..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/Index.en-GB.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - Layout = "_MyLayout"; -} -en-gb-index -@await Html.PartialAsync("_Partial") -@await Html.PartialAsync("_MyPartial") diff --git a/samples/LocalizationSample.Web/Views/Home/Index.fr.cshtml b/samples/LocalizationSample.Web/Views/Home/Index.fr.cshtml deleted file mode 100644 index bed2dcd6a4..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/Index.fr.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - Layout = "_MyLayout"; -} -fr-index -@await Html.PartialAsync("_Partial") -@await Html.PartialAsync("_MyPartial") diff --git a/samples/LocalizationSample.Web/Views/Home/Locpage.cshtml b/samples/LocalizationSample.Web/Views/Home/Locpage.cshtml deleted file mode 100644 index 90dddc4579..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/Locpage.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@{ - Layout = "/Views/Shared/_LocalizationLayout.cshtml"; - var date = new DateTime(2015,6,25); -} -@LocString["Hello there!!"] -@ViewBag.Message -@LocString.GetHtml("Hi", "John", @date , @date.DayOfWeek) diff --git a/samples/LocalizationSample.Web/Views/Home/_MyPartial.cshtml b/samples/LocalizationSample.Web/Views/Home/_MyPartial.cshtml deleted file mode 100644 index 91efca6711..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/_MyPartial.cshtml +++ /dev/null @@ -1 +0,0 @@ -mypartial \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Home/_Partial.cshtml b/samples/LocalizationSample.Web/Views/Home/_Partial.cshtml deleted file mode 100644 index f46b8786e8..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/_Partial.cshtml +++ /dev/null @@ -1 +0,0 @@ -partial \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Home/_Partial.fr.cshtml b/samples/LocalizationSample.Web/Views/Home/_Partial.fr.cshtml deleted file mode 100644 index ceaf0a8514..0000000000 --- a/samples/LocalizationSample.Web/Views/Home/_Partial.fr.cshtml +++ /dev/null @@ -1 +0,0 @@ -fr-partial \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Shared/_LocalizationLayout.cshtml b/samples/LocalizationSample.Web/Views/Shared/_LocalizationLayout.cshtml deleted file mode 100644 index d2f231de2f..0000000000 --- a/samples/LocalizationSample.Web/Views/Shared/_LocalizationLayout.cshtml +++ /dev/null @@ -1 +0,0 @@ -@RenderBody() \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Shared/_MyLayout.cshtml b/samples/LocalizationSample.Web/Views/Shared/_MyLayout.cshtml deleted file mode 100644 index 4ef43dfb2d..0000000000 --- a/samples/LocalizationSample.Web/Views/Shared/_MyLayout.cshtml +++ /dev/null @@ -1 +0,0 @@ -@RenderBody() \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Shared/_MyLayout.fr.cshtml b/samples/LocalizationSample.Web/Views/Shared/_MyLayout.fr.cshtml deleted file mode 100644 index 9341e9bdfc..0000000000 --- a/samples/LocalizationSample.Web/Views/Shared/_MyLayout.fr.cshtml +++ /dev/null @@ -1 +0,0 @@ -@RenderBody() \ No newline at end of file diff --git a/samples/LocalizationSample.Web/Views/Shared/_MyPartial.en-GB.cshtml b/samples/LocalizationSample.Web/Views/Shared/_MyPartial.en-GB.cshtml deleted file mode 100644 index c19523c9e9..0000000000 --- a/samples/LocalizationSample.Web/Views/Shared/_MyPartial.en-GB.cshtml +++ /dev/null @@ -1 +0,0 @@ -mypartial-en-gb-shared diff --git a/samples/LocalizationSample.Web/Views/_ViewImports.cshtml b/samples/LocalizationSample.Web/Views/_ViewImports.cshtml deleted file mode 100644 index bbf2f2a0d5..0000000000 --- a/samples/LocalizationSample.Web/Views/_ViewImports.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@using LocalizationSample.Web -@using Microsoft.AspNetCore.Mvc.Localization -@using Microsoft.Extensions.Localization - -@inject IViewLocalizer LocString \ No newline at end of file diff --git a/samples/LocalizationSample.Web/project.json b/samples/LocalizationSample.Web/project.json deleted file mode 100644 index 6176d0634a..0000000000 --- a/samples/LocalizationSample.Web/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "Views", - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/LocalizationSample.Web/readme.md b/samples/LocalizationSample.Web/readme.md deleted file mode 100644 index ffb8f0e4a3..0000000000 --- a/samples/LocalizationSample.Web/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -LocalizationSample.Web -=== - -This web site illustrates use cases for MVC localization. diff --git a/samples/LocalizationSample.Web/web.config b/samples/LocalizationSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/LocalizationSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Controllers/HomeController.cs b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Controllers/HomeController.cs deleted file mode 100644 index 0eb15028a3..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Controllers/HomeController.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace MvcSubAreaSample.Web.Restaurant.Hours -{ - [Area("Restaurant")] - [SubArea("Hours")] - public class HomeController : Controller - { - [HttpGet] - public IActionResult Index() - { - return View(); - } - } -} diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Views/Home/Index.cshtml b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Views/Home/Index.cshtml deleted file mode 100644 index 3412f2b92a..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Hours/Views/Home/Index.cshtml +++ /dev/null @@ -1,11 +0,0 @@ -@{ - Layout = "/Views/Shared/_Layout.cshtml"; - ViewData["Title"] = "Home Page"; -} - -
-

Hours

-
    -
  • 9-5 M-F
  • -
-
\ No newline at end of file diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Controllers/HomeController.cs b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Controllers/HomeController.cs deleted file mode 100644 index 451acc9394..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Controllers/HomeController.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace MvcSubAreaSample.Web.Restaurant.Menu -{ - [Area("Restaurant")] - [SubArea("Menu")] - public class HomeController : Controller - { - [HttpGet] - public IActionResult Index() - { - return View(); - } - } -} diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Views/Home/Index.cshtml b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Views/Home/Index.cshtml deleted file mode 100644 index 86eecd2707..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Areas/Menu/Views/Home/Index.cshtml +++ /dev/null @@ -1,12 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; - Layout = "/Views/Shared/_Layout.cshtml"; -} - -
-

Menu

-
    -
  • Item 1
  • -
  • Item 2
  • -
-
\ No newline at end of file diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Controllers/HomeController.cs b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Controllers/HomeController.cs deleted file mode 100644 index 1028f066e0..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Controllers/HomeController.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace MvcSubAreaSample.Web.Restaurant -{ - [Area("Restaurant")] - public class HomeController : Controller - { - [HttpGet] - public IActionResult Index() - { - return View(); - } - } -} diff --git a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Views/Home/Index.cshtml b/samples/MvcSubAreaSample.Web/Areas/Restaurant/Views/Home/Index.cshtml deleted file mode 100644 index 6ae0ab6a5d..0000000000 --- a/samples/MvcSubAreaSample.Web/Areas/Restaurant/Views/Home/Index.cshtml +++ /dev/null @@ -1,15 +0,0 @@ -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = "/Views/Shared/_Layout.cshtml"; - ViewData["Title"] = "Home Page"; -} - -
-
-

Areas

- -
-
diff --git a/samples/MvcSubAreaSample.Web/Controllers/HomeController.cs b/samples/MvcSubAreaSample.Web/Controllers/HomeController.cs deleted file mode 100644 index be0d71343e..0000000000 --- a/samples/MvcSubAreaSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace MvcSubAreaSample.Web -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public IActionResult About() - { - ViewData["Message"] = "Your application description page."; - - return View(); - } - - public IActionResult Contact() - { - ViewData["Message"] = "Your contact page."; - - return View(); - } - - public IActionResult Error() - { - return View("~/Views/Shared/Error.cshtml"); - } - } -} diff --git a/samples/MvcSubAreaSample.Web/MvcSubAreaSample.Web.xproj b/samples/MvcSubAreaSample.Web/MvcSubAreaSample.Web.xproj deleted file mode 100644 index fa32fb333e..0000000000 --- a/samples/MvcSubAreaSample.Web/MvcSubAreaSample.Web.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 45F6B3B6-D114-4D77-84D6-561B3957F341 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/samples/MvcSubAreaSample.Web/Startup.cs b/samples/MvcSubAreaSample.Web/Startup.cs deleted file mode 100644 index e13f7cf906..0000000000 --- a/samples/MvcSubAreaSample.Web/Startup.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) .NET Foundation. 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.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Razor; -using Microsoft.Extensions.DependencyInjection; - -namespace MvcSubAreaSample.Web -{ - public class Startup - { - public IServiceProvider ConfigureServices(IServiceCollection services) - { - services.Configure(options => - { - options.ViewLocationExpanders.Add(new SubAreaViewLocationExpander()); - }); - - services.AddMvc(); - - return services.BuildServiceProvider(); - } - - // Configure is called after ConfigureServices is called. - public void Configure(IApplicationBuilder app) - { - // Add MVC to the request pipeline. - app.UseFileServer(); - app.UseMvc(routes => - { - routes.MapRoute("subarearoute", "{area:exists}/{subarea:exists}/{controller=Home}/{action=Index}"); - routes.MapRoute("areaRoute", "{area:exists}/{controller=Home}/{action=Index}"); - routes.MapRoute("controllerActionRoute", "{controller=Home}/{action=Index}"); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs b/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs deleted file mode 100644 index d50244e9a9..0000000000 --- a/samples/MvcSubAreaSample.Web/SubAreaAttribute.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNetCore.Mvc.Routing; - -namespace MvcSubAreaSample.Web -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] - public class SubAreaAttribute : RouteValueAttribute - { - public SubAreaAttribute(string name) - : base("subarea", name) - { - if (string.IsNullOrEmpty(name)) - { - throw new ArgumentException("SubArea name must not be null or empty.", nameof(name)); - } - } - } -} diff --git a/samples/MvcSubAreaSample.Web/SubAreaViewLocationExpander.cs b/samples/MvcSubAreaSample.Web/SubAreaViewLocationExpander.cs deleted file mode 100644 index f0898b0dd8..0000000000 --- a/samples/MvcSubAreaSample.Web/SubAreaViewLocationExpander.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Mvc.Razor; - -namespace MvcSubAreaSample.Web -{ - public class SubAreaViewLocationExpander : IViewLocationExpander - { - private const string _subAreaKey = "subarea"; - - public IEnumerable ExpandViewLocations( - ViewLocationExpanderContext context, - IEnumerable viewLocations) - { - if (context.Values.ContainsKey(_subAreaKey)) - { - var subArea = RazorViewEngine.GetNormalizedRouteValue(context.ActionContext, _subAreaKey); - var subareaViewLocations = new string[] - { - "/Areas/{2}/Areas/" + subArea + "/Views/{1}/{0}.cshtml" - }; - viewLocations = subareaViewLocations.Concat(viewLocations); - } - return viewLocations; - } - - public void PopulateValues(ViewLocationExpanderContext context) - { - string subArea; - if (context.ActionContext.ActionDescriptor.RouteValues.TryGetValue(_subAreaKey, out subArea) && - !string.IsNullOrEmpty(subArea)) - { - context.Values[_subAreaKey] = subArea; - } - } - } -} diff --git a/samples/MvcSubAreaSample.Web/Views/Home/Index.cshtml b/samples/MvcSubAreaSample.Web/Views/Home/Index.cshtml deleted file mode 100644 index 276456c0bb..0000000000 --- a/samples/MvcSubAreaSample.Web/Views/Home/Index.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - ViewData["Title"] = "Home Page"; - Layout = "/Views/Shared/_Layout.cshtml"; -} - -
-
-

Areas

- -
-
diff --git a/samples/MvcSubAreaSample.Web/Views/Shared/_Layout.cshtml b/samples/MvcSubAreaSample.Web/Views/Shared/_Layout.cshtml deleted file mode 100644 index bc2b8083e7..0000000000 --- a/samples/MvcSubAreaSample.Web/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,46 +0,0 @@ - -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - - - - @ViewData["Title"] - MvcSubAreaSample.Web - - - - - -
- @RenderBody() -
-
-

© 2015 - MvcSubAreaSample.Web

-
-
- - - - - @RenderSection("scripts", required: false) - - diff --git a/samples/MvcSubAreaSample.Web/project.json b/samples/MvcSubAreaSample.Web/project.json deleted file mode 100644 index 2b20e0c35d..0000000000 --- a/samples/MvcSubAreaSample.Web/project.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Razor.Tools": { - "type": "build", - "version": "1.0.0-*" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.StaticFiles": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "Views", - "Areas", - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - }, - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-*", - "imports": [ - "portable-net45+wp80+win8+wpa81+dnxcore50" - ] - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/MvcSubAreaSample.Web/web.config b/samples/MvcSubAreaSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/MvcSubAreaSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Components/FeaturedMoviesComponent.cs b/samples/TagHelperSample.Web/Components/FeaturedMoviesComponent.cs deleted file mode 100644 index f711722742..0000000000 --- a/samples/TagHelperSample.Web/Components/FeaturedMoviesComponent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Primitives; -using TagHelperSample.Web.Models; -using TagHelperSample.Web.Services; - -namespace TagHelperSample.Web.Components -{ - [ViewComponent(Name = "FeaturedMovies")] - public class FeaturedMoviesComponent : ViewComponent - { - private readonly IMemoryCache _cache; - private readonly MoviesService _moviesService; - - public FeaturedMoviesComponent(MoviesService moviesService, IMemoryCache cache) - { - _moviesService = moviesService; - _cache = cache; - } - - public IViewComponentResult Invoke() - { - // Since this component is invoked from within a CacheTagHelper, - // cache the movie list and provide an expiration token, which when notified causes the - // CacheTagHelper's cached data to be invalidated. - var cacheKey = "featured_movies"; - IEnumerable movies; - if (!_cache.TryGetValue(cacheKey, out movies)) - { - IChangeToken expirationToken; - movies = _moviesService.GetFeaturedMovies(out expirationToken); - _cache.Set(cacheKey, movies, new MemoryCacheEntryOptions().AddExpirationToken(expirationToken)); - } - - return View(movies); - } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Components/MoviesComponent.cs b/samples/TagHelperSample.Web/Components/MoviesComponent.cs deleted file mode 100644 index ede406716c..0000000000 --- a/samples/TagHelperSample.Web/Components/MoviesComponent.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Primitives; -using TagHelperSample.Web.Services; - -namespace TagHelperSample.Web.Components -{ - [ViewComponent(Name = "Movies")] - public class MoviesComponent : ViewComponent - { - private readonly IMemoryCache _cache; - private readonly MoviesService _moviesService; - - public MoviesComponent(MoviesService moviesService, IMemoryCache cache) - { - _moviesService = moviesService; - _cache = cache; - } - - public IViewComponentResult Invoke(string movieName) - { - string quote; - if (!_cache.TryGetValue(movieName, out quote)) - { - IChangeToken expirationToken; - quote = _moviesService.GetCriticsQuote(out expirationToken); - _cache.Set(movieName, quote, new MemoryCacheEntryOptions().AddExpirationToken(expirationToken)); - } - - return Content(quote); - } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Controllers/HomeController.cs b/samples/TagHelperSample.Web/Controllers/HomeController.cs deleted file mode 100644 index 3d9f388d65..0000000000 --- a/samples/TagHelperSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Rendering; -using TagHelperSample.Web.Models; - -namespace TagHelperSample.Web.Controllers -{ - public class HomeController : Controller - { - private static readonly IEnumerable _items = new SelectList(Enumerable.Range(7, 13)); - private static readonly Dictionary _users = new Dictionary(); - private static int _next; - - public HomeController() - { - // Unable to set ViewBag or ViewData entries from constructor due to an InvalidOperationException thrown - // from the DynamicViewData.ViewData getter. In MVC 5.2, no properties in the Controller class except - // ControllerContext, Url, and anything ControllerContext-derived (e.g. HttpContext and User) return null - // even if invoked from the constructor i.e. prior to the Initialize() call. - ////ViewData["Items"] = _items; - } - - // GET: // - public IActionResult Index() - { - return View(new List(_users.Values)); - } - - // GET: /Home/Create - public IActionResult Create() - { - ViewData["Items"] = _items; - return View(); - } - - // POST: Home/Create - [HttpPost] - public IActionResult Create(User user) - { - if (user != null && ModelState.IsValid) - { - var id = _next++; - user.Id = id; - _users[id] = user; - return RedirectToAction("Index"); - } - - ViewData["Items"] = _items; - return View(); - } - - // GET: /Home/Edit/5 - public IActionResult Edit(int id) - { - User user; - _users.TryGetValue(id, out user); - - ViewData["Items"] = _items; - return View(user); - } - - // POST: Home/Edit/5 - [HttpPost] - public IActionResult Edit(int id, User user) - { - if (user != null && id == user.Id && _users.ContainsKey(id) && ModelState.IsValid) - { - _users[id] = user; - return RedirectToAction("Index"); - } - - ViewData["Items"] = _items; - return View(); - } - - // POST: Home/Reset - [HttpPost] - public IActionResult Reset() - { - _users.Clear(); - _next = 0; - - return RedirectToAction("Index"); - } - } -} diff --git a/samples/TagHelperSample.Web/Controllers/MoviesController.cs b/samples/TagHelperSample.Web/Controllers/MoviesController.cs deleted file mode 100644 index 8e4b852722..0000000000 --- a/samples/TagHelperSample.Web/Controllers/MoviesController.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; -using TagHelperSample.Web.Services; - -namespace TagHelperSample.Web.Controllers -{ - public class MoviesController : Controller - { - private MoviesService _moviesService; - - public MoviesController(MoviesService moviesService) - { - _moviesService = moviesService; - } - - // Sample exhibiting the use of nested cache tag helpers with custom user expiration tokens. - // Trigger expirations cascade, expiration of the inner tag helper's content either due to absolute or sliding - // expiration or due to a user specified expiration token would cause the outer cache tag helper to also expire. - public IActionResult Index() - { - ViewData["Title"] = "Movies"; - return View(); - } - - [HttpPost] - public IActionResult UpdateMovieRatings() - { - _moviesService.UpdateMovieRating(); - - ViewData["Title"] = "Movies with updated ratings"; - return View("Index"); - } - - [HttpPost] - public IActionResult UpdateCriticsQuotes() - { - _moviesService.UpdateCriticsQuotes(); - - ViewData["Title"] = "Movies with updated critics quotes"; - return View("Index"); - } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Controllers/TagHelperController.cs b/samples/TagHelperSample.Web/Controllers/TagHelperController.cs deleted file mode 100644 index 679b4d5904..0000000000 --- a/samples/TagHelperSample.Web/Controllers/TagHelperController.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace TagHelperSample.Web.Controllers -{ - public class TagHelperController : Controller - { - public IActionResult ConditionalComment() - { - return View(); - } - } -} diff --git a/samples/TagHelperSample.Web/Models/FeaturedMovies.cs b/samples/TagHelperSample.Web/Models/FeaturedMovies.cs deleted file mode 100644 index 23908687d8..0000000000 --- a/samples/TagHelperSample.Web/Models/FeaturedMovies.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace TagHelperSample.Web.Models -{ - public class FeaturedMovies - { - public string Name { get; set; } - - public string Description { get; set; } - - public int Rank { get; set; } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Models/User.cs b/samples/TagHelperSample.Web/Models/User.cs deleted file mode 100644 index 37d8ffe9e5..0000000000 --- a/samples/TagHelperSample.Web/Models/User.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation. 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.ComponentModel.DataAnnotations; - -namespace TagHelperSample.Web.Models -{ - public class User - { - public int Id { get; set; } - - public string Name { get; set; } - - public string Blurb { get; set; } - - [DataType(DataType.Date)] - public DateTimeOffset DateOfBirth { get; set; } - - public int YearsEmployeed { get; set; } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Services/MoviesService.cs b/samples/TagHelperSample.Web/Services/MoviesService.cs deleted file mode 100644 index cff1019a4b..0000000000 --- a/samples/TagHelperSample.Web/Services/MoviesService.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Linq; -using System.Threading; -using Microsoft.Extensions.Primitives; -using TagHelperSample.Web.Models; - -namespace TagHelperSample.Web.Services -{ - public class MoviesService - { - private readonly Random _random = new Random(); - - private CancellationTokenSource _featuredMoviesTokenSource; - private CancellationTokenSource _quotesTokenSource; - - public IEnumerable GetFeaturedMovies(out IChangeToken expirationToken) - { - _featuredMoviesTokenSource = new CancellationTokenSource(); - - expirationToken = new CancellationChangeToken(_featuredMoviesTokenSource.Token); - return GetMovies().OrderBy(m => m.Rank).Take(2); - } - - public void UpdateMovieRating() - { - _featuredMoviesTokenSource.Cancel(); - _featuredMoviesTokenSource.Dispose(); - _featuredMoviesTokenSource = null; - } - - public string GetCriticsQuote(out IChangeToken expirationToken) - { - _quotesTokenSource = new CancellationTokenSource(); - - var quotes = new[] - { - "A must see for iguana lovers everywhere", - "Slightly better than watching paint dry", - "Never felt more relieved seeing the credits roll", - "Bravo!" - }; - - expirationToken = new CancellationChangeToken(_quotesTokenSource.Token); - return quotes[_random.Next(0, quotes.Length)]; - } - - public void UpdateCriticsQuotes() - { - _quotesTokenSource.Cancel(); - _quotesTokenSource.Dispose(); - _quotesTokenSource = null; - } - - private IEnumerable GetMovies() - { - yield return new FeaturedMovies { Name = "A day in the life of a blue whale", Rank = _random.Next(1, 10) }; - yield return new FeaturedMovies { Name = "FlashForward", Rank = _random.Next(1, 10) }; - yield return new FeaturedMovies { Name = "Frontier", Rank = _random.Next(1, 10) }; - yield return new FeaturedMovies { Name = "Attack of the space spiders", Rank = _random.Next(1, 10) }; - yield return new FeaturedMovies { Name = "Rift 3", Rank = _random.Next(1, 10) }; - } - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Startup.cs b/samples/TagHelperSample.Web/Startup.cs deleted file mode 100644 index 70a6a12303..0000000000 --- a/samples/TagHelperSample.Web/Startup.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation. 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.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using TagHelperSample.Web.Services; - -namespace TagHelperSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc(); - - services.AddSingleton(); - } - - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole((name, logLevel) => - name.StartsWith("Microsoft.AspNetCore.Mvc.TagHelpers", StringComparison.OrdinalIgnoreCase) - || (name.StartsWith("Microsoft.Net.Http.Server.WebListener", StringComparison.OrdinalIgnoreCase) - && logLevel >= LogLevel.Information)); - - app.UseDeveloperExceptionPage(); - - app.UseStaticFiles(); - - app.UseMvcWithDefaultRoute(); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseKestrel() - .UseStartup() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/TagHelperSample.Web/TagHelperSample.Web.xproj b/samples/TagHelperSample.Web/TagHelperSample.Web.xproj deleted file mode 100644 index 2fddf55f67..0000000000 --- a/samples/TagHelperSample.Web/TagHelperSample.Web.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 2223120f-d675-40da-8cd8-11dc14a0b2c7 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - 30540 - - - \ No newline at end of file diff --git a/samples/TagHelperSample.Web/TagHelpers/CommentMode.cs b/samples/TagHelperSample.Web/TagHelpers/CommentMode.cs deleted file mode 100644 index f671d1a3c9..0000000000 --- a/samples/TagHelperSample.Web/TagHelpers/CommentMode.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace TagHelperSample.Web -{ - public enum CommentMode - { - DownlevelHidden = 0, - - DownlevelRevealed = 1 - } -} diff --git a/samples/TagHelperSample.Web/TagHelpers/ConditionalCommentTagHelper.cs b/samples/TagHelperSample.Web/TagHelpers/ConditionalCommentTagHelper.cs deleted file mode 100644 index b3c4ccee52..0000000000 --- a/samples/TagHelperSample.Web/TagHelpers/ConditionalCommentTagHelper.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Razor.TagHelpers; - -namespace TagHelperSample.Web -{ - [HtmlTargetElement("iecondition")] - public class ConditionalCommentTagHelper : TagHelper - { - public CommentMode Mode { get; set; } - - public string Condition { get; set; } - - public override void Process(TagHelperContext context, TagHelperOutput output) - { - output.TagName = null; - - var modeModifier = string.Empty; - - if (Mode == CommentMode.DownlevelHidden) - { - modeModifier = "--"; - } - - output.PreContent.AppendHtml(""); - - output.PostContent.AppendHtml(""); - } - } -} diff --git a/samples/TagHelperSample.Web/Views/Home/Create.cshtml b/samples/TagHelperSample.Web/Views/Home/Create.cshtml deleted file mode 100644 index 6adc193f21..0000000000 --- a/samples/TagHelperSample.Web/Views/Home/Create.cshtml +++ /dev/null @@ -1,94 +0,0 @@ - -@using TagHelperSample.Web.Models -@model User - -@{ - Html.Html5DateRenderingMode = Html5DateRenderingMode.Rfc3339; -} - -

Create

- -@* antiforgery is on by default *@ -@*
tag helper will special-case only elements with an "asp-action" or "asp-antiforgery" attribute. *@ - -
- @* validation summary tag helper will target just
elements and append the list of errors *@ - @* - i.e. this helper, like - -
- @* no special-case for the "asp-for" attribute; now distinct from HTML "for" attribute. *@ - -
- - -
-
-
- -
- @* will automatically infer type="date" (reused HTML attribute) and asp-format="{0:yyyy-MM-dd}" (optional bound attribute) *@ - - When were you born? -
-
-
- -
- @* - @* Static use of "selected" attribute may cause HTML errors if in a single-selection helper not to select anything from "items" *@ - @* - wouldn't help if user selected one static - - - - - - - - - - - - @* targets only in Beta; does not support equivalent of Html.ValidationMessageFor()'s tag parameter *@ - @* - may eventually either support additional tags e.g.

and

or all tags /> *@ - -
-
-
- -
- - -
-
- -
-
- @* this lacks a "asp-for" attribute and will not be changed by the tag helper *@ - -
-
-
- - - diff --git a/samples/TagHelperSample.Web/Views/Home/Edit.cshtml b/samples/TagHelperSample.Web/Views/Home/Edit.cshtml deleted file mode 100644 index 41b0afc1e9..0000000000 --- a/samples/TagHelperSample.Web/Views/Home/Edit.cshtml +++ /dev/null @@ -1,61 +0,0 @@ - -@using TagHelperSample.Web.Models -@model User - -

Edit

- -
-
-
- - -
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
- -
-
- -
-
-
-
- - diff --git a/samples/TagHelperSample.Web/Views/Home/Index.cshtml b/samples/TagHelperSample.Web/Views/Home/Index.cshtml deleted file mode 100644 index b745a5f71a..0000000000 --- a/samples/TagHelperSample.Web/Views/Home/Index.cshtml +++ /dev/null @@ -1,57 +0,0 @@ -@* - 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 TagHelperSample.Web.Models -@model IList - - - Hello, you're in Development - - - - - - -

Index

-@if (Model != null && Model.Count() != 0) -{ -
- @for (var index = 0; index < Model.Count(); ++index) - { -
- - -
-
- - -
-
- - -
-
- - -
- -

- Edit -

- } -
-} -

- Create New -

diff --git a/samples/TagHelperSample.Web/Views/Movies/Index.cshtml b/samples/TagHelperSample.Web/Views/Movies/Index.cshtml deleted file mode 100644 index 80fe8db349..0000000000 --- a/samples/TagHelperSample.Web/Views/Movies/Index.cshtml +++ /dev/null @@ -1,43 +0,0 @@ - - - - @ViewBag.Title - - - -
-

Watch the greatest movies right here!

- Submit your movie rankings: - -
- Movies + ratings go here - -
- -
- Movies + ratings go here - -
-
- -
- - diff --git a/samples/TagHelperSample.Web/Views/Shared/Components/FeaturedMovies/Default.cshtml b/samples/TagHelperSample.Web/Views/Shared/Components/FeaturedMovies/Default.cshtml deleted file mode 100644 index 1444339630..0000000000 --- a/samples/TagHelperSample.Web/Views/Shared/Components/FeaturedMovies/Default.cshtml +++ /dev/null @@ -1,17 +0,0 @@ -@model IEnumerable - -
- @foreach (var movie in Model) - { -
(@movie.Rank) @movie.Name
-
-
- @movie.Description -
- Critics say: - - @await Component.InvokeAsync("Movies", new { movieName = movie.Name }) - -
- } -
\ No newline at end of file diff --git a/samples/TagHelperSample.Web/Views/Shared/_Layout.cshtml b/samples/TagHelperSample.Web/Views/Shared/_Layout.cshtml deleted file mode 100644 index 71fe0e25d7..0000000000 --- a/samples/TagHelperSample.Web/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - @RenderBody() - - \ No newline at end of file diff --git a/samples/TagHelperSample.Web/Views/TagHelper/ConditionalComment.cshtml b/samples/TagHelperSample.Web/Views/TagHelper/ConditionalComment.cshtml deleted file mode 100644 index c040a4499c..0000000000 --- a/samples/TagHelperSample.Web/Views/TagHelper/ConditionalComment.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@using TagHelperSample.Web -@addTagHelper *, TagHelperSample.Web - - -

Content visible to all browsers newer than Internet Explorer 7.

-
- -

Content visible only to Internet Explorer 7 users.

-
diff --git a/samples/TagHelperSample.Web/Views/_ViewImports.cshtml b/samples/TagHelperSample.Web/Views/_ViewImports.cshtml deleted file mode 100644 index a757b413b9..0000000000 --- a/samples/TagHelperSample.Web/Views/_ViewImports.cshtml +++ /dev/null @@ -1 +0,0 @@ -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/samples/TagHelperSample.Web/Views/_ViewStart.cshtml b/samples/TagHelperSample.Web/Views/_ViewStart.cshtml deleted file mode 100644 index 1af6e49466..0000000000 --- a/samples/TagHelperSample.Web/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/appRoot.css b/samples/TagHelperSample.Web/appRoot.css deleted file mode 100644 index 7b9214822c..0000000000 --- a/samples/TagHelperSample.Web/appRoot.css +++ /dev/null @@ -1,8 +0,0 @@ -body::after { - display: block; - background-color: #ff0000; - color: #fff; - font-size: 1.2em; - margin-top: 2.4em; - content: "ERROR: Stylesheet 'appRoot.css' was loaded from outside webroot!"; -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/project.json b/samples/TagHelperSample.Web/project.json deleted file mode 100644 index 5ccf070c3b..0000000000 --- a/samples/TagHelperSample.Web/project.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "warningsAsErrors": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Razor.Tools": { - "type": "build", - "version": "1.0.0-*" - }, - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.StaticFiles": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-*", - "imports": [ - "portable-net45+wp80+win8+wpa81+dnxcore50" - ] - }, - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "Views", - "wwwroot", - "web.config" - ], - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/readme.md b/samples/TagHelperSample.Web/readme.md deleted file mode 100644 index 69d598f4c3..0000000000 --- a/samples/TagHelperSample.Web/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -TagHelperSample.Web -=== -This sample web project illustrates TagHelper use. Please build from root -(`.\build.cmd` on Windows; `./build.sh` elsewhere) before using this site. - -### What this sample contains -1. Creating, editing and viewing custom users with validation. - 1. `/` lists current users. - 2. `/Home/Create` create a new user. - 3. `/Home/Edit/{id:int}` edit a user. -2. View Components and nested caching in views. - 1. `/Movies/` Current movie ratings and critic quotes. Click on the buttons on the page to update values in the side bar. -3. Custom TagHelper to enable browser detection based content. - 1. `/TagHelper/ConditionalComment` Shows different content if your browser is IE7. diff --git a/samples/TagHelperSample.Web/web.config b/samples/TagHelperSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/TagHelperSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/samples/TagHelperSample.Web/wwwroot/css/sub/blank.css b/samples/TagHelperSample.Web/wwwroot/css/sub/blank.css deleted file mode 100644 index 2d91681f81..0000000000 --- a/samples/TagHelperSample.Web/wwwroot/css/sub/blank.css +++ /dev/null @@ -1 +0,0 @@ -body {} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/wwwroot/fallback.js b/samples/TagHelperSample.Web/wwwroot/fallback.js deleted file mode 100644 index 9de5a6a3e5..0000000000 --- a/samples/TagHelperSample.Web/wwwroot/fallback.js +++ /dev/null @@ -1,6 +0,0 @@ -// 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. - -function bar() { - document.write("

foo is from fallback

"); -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/wwwroot/original.js b/samples/TagHelperSample.Web/wwwroot/original.js deleted file mode 100644 index 3097a25b25..0000000000 --- a/samples/TagHelperSample.Web/wwwroot/original.js +++ /dev/null @@ -1,10 +0,0 @@ -// 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. - -function foo() { - return 1; -} - -function bar() { - document.write("

foo is available

"); -} \ No newline at end of file diff --git a/samples/TagHelperSample.Web/wwwroot/site.css b/samples/TagHelperSample.Web/wwwroot/site.css deleted file mode 100644 index e69a71c805..0000000000 --- a/samples/TagHelperSample.Web/wwwroot/site.css +++ /dev/null @@ -1,13 +0,0 @@ -meta.fallback-test { - visibility: hidden; -} - -body::after { - display: block; - color: #0fa912; - font-size: 0.9em; - margin-top: 2.4em; - content: "Stylesheet 'site.css' loaded successfully!"; -} - - diff --git a/samples/UrlHelperSample.Web/AppOptions.cs b/samples/UrlHelperSample.Web/AppOptions.cs deleted file mode 100644 index d155ee6b1d..0000000000 --- a/samples/UrlHelperSample.Web/AppOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace UrlHelperSample.Web -{ - public class AppOptions - { - public bool ServeCDNContent { get; set; } - - public string CDNServerBaseUrl { get; set; } - - public bool GenerateLowercaseUrls { get; set; } - } -} \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/Controllers/HomeController.cs b/samples/UrlHelperSample.Web/Controllers/HomeController.cs deleted file mode 100644 index 381944b14a..0000000000 --- a/samples/UrlHelperSample.Web/Controllers/HomeController.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; - -namespace UrlHelperSample.Web.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View(); - } - - public string UrlContent() - { - return Url.Content("~/Bootstrap.min.css"); - } - - public string LinkByUrlAction() - { - return Url.Action("UrlContent", "Home", null); - } - - public string LinkByUrlRouteUrl() - { - return Url.RouteUrl("SimplePocoApi", new { id = 10 }); - } - } -} \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/Controllers/SimplePocoController.cs b/samples/UrlHelperSample.Web/Controllers/SimplePocoController.cs deleted file mode 100644 index 11c2955bc9..0000000000 --- a/samples/UrlHelperSample.Web/Controllers/SimplePocoController.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Routing; - -namespace UrlHelperSample.Web.Controllers -{ - [Route("api/[controller]/{id?}", Name = "SimplePocoApi")] - public class SimplePocoController - { - private readonly IUrlHelper _urlHelper; - - public SimplePocoController(IUrlHelper urlHelper) - { - _urlHelper = urlHelper; - } - - [HttpGet] - public string GetById(int id) - { - return "value:" + id; - } - } -} \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/CustomUrlHelper.cs b/samples/UrlHelperSample.Web/CustomUrlHelper.cs deleted file mode 100644 index 7c7e699300..0000000000 --- a/samples/UrlHelperSample.Web/CustomUrlHelper.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Routing; - -namespace UrlHelperSample.Web -{ - /// - /// Following are some of the scenarios exercised here: - /// 1. Based on configuration, generate Content urls pointing to local or a CDN server - /// 2. Based on configuration, generate lower case urls - /// - public class CustomUrlHelper : UrlHelper - { - private readonly AppOptions _options; - - public CustomUrlHelper(ActionContext actionContext, AppOptions options) - : base(actionContext) - { - _options = options; - } - - /// - /// Depending on config data, generates an absolute url pointing to a CDN server - /// or falls back to the default behavior - /// - /// The virtual path of the content. - /// The absolute url. - public override string Content(string contentPath) - { - if (_options.ServeCDNContent - && contentPath.StartsWith("~/", StringComparison.Ordinal)) - { - var segment = new PathString(contentPath.Substring(1)); - - return ConvertToLowercaseUrl(_options.CDNServerBaseUrl + segment); - } - - return ConvertToLowercaseUrl(base.Content(contentPath)); - } - - public override string RouteUrl(UrlRouteContext routeContext) - { - return ConvertToLowercaseUrl(base.RouteUrl(routeContext)); - } - - public override string Action(UrlActionContext actionContext) - { - return ConvertToLowercaseUrl(base.Action(actionContext)); - } - - private string ConvertToLowercaseUrl(string url) - { - if (!string.IsNullOrEmpty(url) - && _options.GenerateLowercaseUrls) - { - return url.ToLowerInvariant(); - } - - return url; - } - } -} \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/CustomUrlHelperFactory.cs b/samples/UrlHelperSample.Web/CustomUrlHelperFactory.cs deleted file mode 100644 index 5b03bb4ee8..0000000000 --- a/samples/UrlHelperSample.Web/CustomUrlHelperFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Routing; -using Microsoft.Extensions.Options; - -namespace UrlHelperSample.Web -{ - public class CustomUrlHelperFactory : IUrlHelperFactory - { - private readonly AppOptions _options; - - public CustomUrlHelperFactory(IOptions options) - { - _options = options.Value; - } - - public IUrlHelper GetUrlHelper(ActionContext context) - { - return new CustomUrlHelper(context, _options); - } - } -} diff --git a/samples/UrlHelperSample.Web/Startup.cs b/samples/UrlHelperSample.Web/Startup.cs deleted file mode 100644 index e2a5c029d2..0000000000 --- a/samples/UrlHelperSample.Web/Startup.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Routing; -using Microsoft.Extensions.DependencyInjection; - -namespace UrlHelperSample.Web -{ - public class Startup - { - // Set up application services - public void ConfigureServices(IServiceCollection services) - { - services.Configure(optionsSetup => - { - optionsSetup.ServeCDNContent = true; - optionsSetup.CDNServerBaseUrl = "http://cdn.contoso.com"; - optionsSetup.GenerateLowercaseUrls = true; - }); - - // Add MVC services to the services container - services.AddMvc(); - - services.AddSingleton(); - } - - public void Configure(IApplicationBuilder app) - { - // Add MVC to the request pipeline - app.UseMvc(routes => - { - routes.MapRoute("Default", "{controller=Home}/{action=Index}"); - }); - } - - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseStartup() - .UseKestrel() - .UseIISIntegration() - .Build(); - - host.Run(); - } - } -} - diff --git a/samples/UrlHelperSample.Web/UrlHelperSample.Web.xproj b/samples/UrlHelperSample.Web/UrlHelperSample.Web.xproj deleted file mode 100644 index 3f3739c9b5..0000000000 --- a/samples/UrlHelperSample.Web/UrlHelperSample.Web.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 73f095d2-d0bd-4d03-bc17-d7a5ef0c0191 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/Views/Home/Index.cshtml b/samples/UrlHelperSample.Web/Views/Home/Index.cshtml deleted file mode 100644 index 17abb53eec..0000000000 --- a/samples/UrlHelperSample.Web/Views/Home/Index.cshtml +++ /dev/null @@ -1 +0,0 @@ -@Url.Content("~/Bootstrap.min.css") \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/Views/SimplePoco/Index.cshtml b/samples/UrlHelperSample.Web/Views/SimplePoco/Index.cshtml deleted file mode 100644 index 17abb53eec..0000000000 --- a/samples/UrlHelperSample.Web/Views/SimplePoco/Index.cshtml +++ /dev/null @@ -1 +0,0 @@ -@Url.Content("~/Bootstrap.min.css") \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/project.json b/samples/UrlHelperSample.Web/project.json deleted file mode 100644 index deb62ea621..0000000000 --- a/samples/UrlHelperSample.Web/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.AspNetCore.Mvc": "1.0.0-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - }, - "frameworks": { - "net451": { }, - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - } - }, - "content": [ - "Views", - "web.config" - ], - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/samples/UrlHelperSample.Web/readme.md b/samples/UrlHelperSample.Web/readme.md deleted file mode 100644 index 39d447bb9e..0000000000 --- a/samples/UrlHelperSample.Web/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -UrlHelperSample.Web -=== - -This web site illustrates how to register a `CustomURLHelper` which can based on configuration, generate content - urls pointing to local or a CDN server and generate lower case urls. diff --git a/samples/UrlHelperSample.Web/web.config b/samples/UrlHelperSample.Web/web.config deleted file mode 100644 index f0398741c5..0000000000 --- a/samples/UrlHelperSample.Web/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ActionConstraintSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ActionConstraintSampleTest.cs deleted file mode 100644 index d7c38755a2..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ActionConstraintSampleTest.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class ActionConstraintSampleTest : IClassFixture> - { - public ActionConstraintSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task ControllerWithActionConstraint_SelectsSpecificController() - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Items/US/GetItems"); - request.Headers.Add("User", "Blah"); - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Hello from US", body); - } - - [Fact] - public async Task ControllerWithActionConstraint_NoMatchesFound_SelectsDefaultController() - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Items/CA/GetItems"); - request.Headers.Add("User", "Blah"); - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Hello from everywhere", body); - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomRouteSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomRouteSampleTest.cs deleted file mode 100644 index 198da2a0ac..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomRouteSampleTest.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class CustomRouteSampleTest : IClassFixture> - { - public CustomRouteSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Theory] - [InlineData("Javier", "Hola from Spain.")] - [InlineData("Doug", "Hello from Canada.")] - [InlineData("Ryan", "Hello from the USA.")] - public async Task RouteToLocale_ConventionalRoute_BasedOnUser(string user, string expected) - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Products/Index"); - request.Headers.Add("User", user); - - // Act - var response = await Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var content = await response.Content.ReadAsStringAsync(); - Assert.Equal(expected, content); - } - - [Theory] - [InlineData("Javier", "Hello from es-ES.")] - [InlineData("Doug", "Hello from en-CA.")] - [InlineData("Ryan", "Hello from en-US.")] - public async Task RouteWithAttributeRoute_IncludesLocale_BasedOnUser(string user, string expected) - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Orders/5"); - request.Headers.Add("User", user); - - // Act - var response = await Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var content = await response.Content.ReadAsStringAsync(); - Assert.Equal(expected, content); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomUrlHelperTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomUrlHelperTest.cs deleted file mode 100644 index b84455c3d1..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/CustomUrlHelperTest.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - /// - /// The tests here verify the extensibility of . - /// - /// Following are some of the scenarios exercised here: - /// 1. Based on configuration, generate Content urls pointing to local or a CDN server - /// 2. Based on configuration, generate lower case urls - /// - public class CustomUrlHelperTests : IClassFixture> - { - private const string _cdnServerBaseUrl = "http://cdn.contoso.com"; - - public CustomUrlHelperTests(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task CustomUrlHelper_GeneratesUrlFromController() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Home/UrlContent"); - var responseData = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(_cdnServerBaseUrl + "/bootstrap.min.css", responseData); - } - - [Fact] - public async Task CustomUrlHelper_GeneratesUrlFromView() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Home/Index"); - var responseData = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains(_cdnServerBaseUrl + "/bootstrap.min.css", responseData); - } - - [Theory] - [InlineData("http://localhost/Home/LinkByUrlRouteUrl", "/api/simplepoco/10")] - [InlineData("http://localhost/Home/LinkByUrlAction", "/home/urlcontent")] - public async Task LowercaseUrls_LinkGeneration(string url, string expectedLink) - { - // Arrange & Act - var response = await Client.GetAsync(url); - var responseData = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedLink, responseData, ignoreCase: false); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/EmbeddedViewSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/EmbeddedViewSampleTest.cs deleted file mode 100644 index a105642c46..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/EmbeddedViewSampleTest.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class EmbeddedViewSampleTest : IClassFixture> - { - public EmbeddedViewSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task RazorViewEngine_UsesFileProviderOnViewEngineOptionsToLocateViews() - { - // Arrange - var expectedMessage = "Hello test-user, this is /Home/EchoActionUrl"; - - // Act - var response = await Client.GetStringAsync("http://localhost/Home/EchoActionUrl?User=test-user"); - - // Assert - Assert.Equal(expectedMessage, response); - } - - [Fact] - public async Task RazorViewEngine_UsesFileProviderOnViewEngineOptionsToLocateAreaViews() - { - // Arrange - var expectedMessage = "Hello admin-user, this is /Restricted/Admin/Login"; - var target = "http://localhost/Restricted/Admin/Login?AdminUser=admin-user"; - - // Act - var response = await Client.GetStringAsync(target); - - // Assert - Assert.Equal(expectedMessage, response); - } - - [Fact] - public async Task RazorViewEngine_NormalizesControllerRouteValue_WhenLookingUpViewPaths() - { - // Arrange - var expectedMessage = "Hello test-user, this is /home/echoactionurl"; - - // Act - var response = await Client.GetStringAsync("http://localhost/home/echoactionurl?User=test-user"); - - // Assert - Assert.Equal(expectedMessage, response); - } - - [Fact] - public async Task RazorViewEngine_NormalizesAreaRouteValue_WhenLookupViewPaths() - { - // Arrange - var expectedMessage = "Hello admin-user, this is /restricted/admin/login"; - var target = "http://localhost/restricted/admin/login?AdminUser=admin-user"; - - // Act - var response = await Client.GetStringAsync(target); - - // Assert - Assert.Equal(expectedMessage, response); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FormatFilterSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FormatFilterSampleTest.cs deleted file mode 100644 index 4331d07566..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FormatFilterSampleTest.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) .NET Foundation. 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.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class FormatFilterSampleTest : IClassFixture> - { - // Typical accept header sent by Chrome browser - private const string ChromeAcceptHeader = "text/html,application/xhtml+xml," + - "application/xml;q=0.9,image/webp,*/*;q=0.8"; - - public FormatFilterSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task FormatFilter_NoExtensionInRequest() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/FormatFilter/GetProduct/5"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"{""SampleInt"":5}", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_ExtensionInRequest_Default() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/FormatFilter/GetProduct/5.json"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"{""SampleInt"":5}", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_ExtensionInRequest_Optional() - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/FormatFilter/GetProduct.json"); - request.Headers.Add("Accept", ChromeAcceptHeader); - - // Act - var response = await Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"{""SampleInt"":0}", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_ExtensionInRequest_Custom() - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/FormatFilter/GetProduct/5.custom"); - request.Headers.Add("Accept", ChromeAcceptHeader); - - // Act - var response = await Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"SampleInt:5", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_ExtensionInRequest_CaseInsensitivity() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/FormatFilter/GetProduct/5.Custom"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"SampleInt:5", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_ExtensionInRequest_NonExistant() - { - // Arrange - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/FormatFilter/GetProduct/5.xml"); - request.Headers.Add("Accept", ChromeAcceptHeader); - - // Act - var response = await Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task FormatFilter_And_ProducesFilter_Match() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/FormatFilter/ProducesMethod/5.json"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"{""SampleInt"":5}", await response.Content.ReadAsStringAsync()); - } - - [Fact] - public async Task FormatFilter_And_ProducesFilter_Conflict() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/FormatFilter/ProducesMethod/5.xml"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task FormatFilter_And_OverrideProducesFilter() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/ProducesOverride/ReturnClassName"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(@"ProducesOverrideController", await response.Content.ReadAsStringAsync()); - Assert.Equal("application/custom", response.Content.Headers.ContentType.MediaType); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/InlineConstraintSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/InlineConstraintSampleTest.cs deleted file mode 100644 index cfb20bd0ee..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/InlineConstraintSampleTest.cs +++ /dev/null @@ -1,552 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Newtonsoft.Json; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class InlineConstraintSampleTest : IClassFixture> - { - public InlineConstraintSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task RoutingToANonExistantArea_WithExistConstraint_RoutesToCorrectAction() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/constant-prefix/Users"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var returnValue = await response.Content.ReadAsStringAsync(); - Assert.Equal("Users.Index", returnValue); - } - - [Fact] - public async Task GetProductById_IntConstraintForOptionalId_IdPresent() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductById/5"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var result = await GetResponseValues(response); - Assert.Equal(result["id"], "5"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductById"); - } - - [Fact] - public async Task GetProductById_IntConstraintForOptionalId_NoId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductById"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductById"); - } - - [Fact] - public async Task GetProductById_IntConstraintForOptionalId_NotIntId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductById/asdf"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByName_AlphaContraintForMandatoryName_ValidName() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByName/asdf"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["name"], "asdf"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByName"); - } - - [Fact] - public async Task GetProductByName_AlphaContraintForMandatoryName_NonAlphaName() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByName/asd123"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByName_AlphaContraintForMandatoryName_NoName() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByName"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByManufacturingDate_DateTimeConstraintForMandatoryDateTime_ValidDateTime() - { - // Arrange & Act - var response = - await Client.GetAsync(@"http://localhost/products/GetProductByManufacturingDate/2014-10-11T13:45:30"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var result = await GetResponseValues(response); - Assert.Equal(result["dateTime"], new DateTime(2014, 10, 11, 13, 45, 30)); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByManufacturingDate"); - } - - [Fact] - public async Task GetProductByCategoryName_StringLengthConstraint_ForOptionalCategoryName_ValidCatName() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByCategoryName/Sports"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["name"], "Sports"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByCategoryName"); - } - - [Fact] - public async Task GetProductByCategoryName_StringLengthConstraint_ForOptionalCategoryName_InvalidCatName() - { - // Arrange & Act - var response = - await Client.GetAsync("http://localhost/products/GetProductByCategoryName/SportsSportsSportsSports"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByCategoryName_StringLength1To20Constraint_ForOptionalCategoryName_NoCatName() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByCategoryName"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByCategoryName"); - } - - [Fact] - public async Task GetProductByCategoryId_Int10To100Constraint_ForMandatoryCatId_ValidId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByCategoryId/40"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["catId"], "40"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByCategoryId"); - } - - [Fact] - public async Task GetProductByCategoryId_Int10To100Constraint_ForMandatoryCatId_InvalidId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByCategoryId/5"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByCategoryId_Int10To100Constraint_ForMandatoryCatId_NotIntId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByCategoryId/asdf"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetProductByPrice_FloatContraintForOptionalPrice_Valid() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByPrice/4023.23423"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["price"], "4023.23423"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByPrice"); - } - - [Fact] - public async Task GetProductByPrice_FloatContraintForOptionalPrice_NoPrice() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByPrice"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByPrice"); - } - - [Fact] - public async Task GetProductByManufacturerId_IntMin10Constraint_ForOptionalManufacturerId_Valid() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByManufacturerId/57"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["manId"], "57"); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByManufacturerId"); - } - - [Fact] - public async Task GetProductByManufacturerId_IntMin10Cinstraint_ForOptionalManufacturerId_NoId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetProductByManufacturerId"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetProductByManufacturerId"); - } - - [Fact] - public async Task GetUserByName_RegExConstraint_ForMandatoryName_Valid() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetUserByName/abc"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Products"); - Assert.Equal(result["action"], "GetUserByName"); - Assert.Equal(result["name"], "abc"); - } - - [Fact] - public async Task GetUserByName_RegExConstraint_ForMandatoryName_InValid() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/products/GetUserByName/abcd"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetStoreById_GuidConstraintForOptionalId_Valid() - { - // Arrange & Act - var response = - await Client.GetAsync("http://localhost/Store/GetStoreById/691cf17a-791b-4af8-99fd-e739e168170f"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["id"], "691cf17a-791b-4af8-99fd-e739e168170f"); - Assert.Equal(result["controller"], "Store"); - Assert.Equal(result["action"], "GetStoreById"); - } - - [Fact] - public async Task GetStoreById_GuidConstraintForOptionalId_NoId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreById"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["controller"], "Store"); - Assert.Equal(result["action"], "GetStoreById"); - } - - [Fact] - public async Task GetStoreById_GuidConstraintForOptionalId_NotGuidId() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreById/691cf17a-791b"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetStoreByLocation_StringLengthConstraint_AlphaConstraint_ForMandatoryLocation_Valid() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreByLocation/Bellevue"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var result = await GetResponseValues(response); - Assert.Equal(result["location"], "Bellevue"); - Assert.Equal(result["controller"], "Store"); - Assert.Equal(result["action"], "GetStoreByLocation"); - } - - [Fact] - public async Task GetStoreByLocation_StringLengthConstraint_AlphaConstraint_ForMandatoryLocation_MoreLength() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreByLocation/BellevueRedmond"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetStoreByLocation_StringLengthConstraint_AlphaConstraint_ForMandatoryLocation_LessLength() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreByLocation/Be"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Fact] - public async Task GetStoreByLocation_StringLengthConstraint_AlphaConstraint_ForMandatoryLocation_NoAlpha() - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/Store/GetStoreByLocation/Bell124"); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - } - - [Theory] - // Testing custom inline constraint updated in ConstraintMap - [InlineData("1234567890128", "13 Digit ISBN Number")] - // Testing custom inline constraint configured via MapRoute - [InlineData("1-234-56789-X", "10 Digit ISBN Number")] - public async Task CustomInlineConstraint_Add_Update(string isbn, string expectedBody) - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost/book/index/" + isbn); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains(expectedBody, body); - } - - public static IEnumerable QueryParameters - { - // The first four parameters are controller name, action name, parameters in the query and their values. - // These are used to generate a link, the last parameter is expected generated link - get - { - // Attribute Route, id:int? constraint - yield return new object[] - { - "Products", - "GetProductById", - "id", - "5", - "/products/GetProductById/5" - }; - - // Attribute Route, id:int? constraint - yield return new object[] - { - "Products", - "GetProductById", - "id", - "sdsd", - string.Empty // Link generation expected to fail. - }; - - // Attribute Route, name:alpha constraint - yield return new object[] - { - "Products", - "GetProductByName", - "name", - "zxcv", - "/products/GetProductByName/zxcv" - }; - - // Attribute Route, name:length(1,20)? constraint - yield return new object[] - { - "Products", - "GetProductByCategoryName", - "name", - "sports", - "/products/GetProductByCategoryName/sports" - }; - - // Attribute Route, name:length(1,20)? constraint - yield return new object[] - { - "Products", - "GetProductByCategoryName", - null, - null, - "/products/GetProductByCategoryName" - }; - - // Attribute Route, catId:int:range(10, 100) constraint - yield return new object[] - { - "Products", - "GetProductByCategoryId", - "catId", - "50", - "/products/GetProductByCategoryId/50" - }; - - // Attribute Route, catId:int:range(10, 100) constraint - yield return new object[] - { - "Products", - "GetProductByCategoryId", - "catId", - "500", - string.Empty // Link generation expected to fail. - }; - - // Attribute Route, name:length(1,20)? constraint - yield return new object[] - { - "Products", - "GetProductByPrice", - "price", - "123.45", - "/products/GetProductByPrice/123.45" - }; - - // Attribute Route, price:float? constraint - yield return new object[] - { - "Products", - "GetProductByManufacturerId", - "manId", - "15", - "/products/GetProductByManufacturerId/15" - }; - - // Attribute Route, manId:int:min(10)? constraint - yield return new object[] - { - "Products", - "GetProductByManufacturerId", - "manId", - "qwer", - string.Empty // Link generation expected to fail. - }; - - // Attribute Route, manId:int:min(10)? constraint - yield return new object[] - { - "Products", - "GetProductByManufacturerId", - "manId", - "1", - string.Empty // Link generation expected to fail. - }; - - // Attribute Route, dateTime:datetime constraint - yield return new object[] - { - "Products", - "GetProductByManufacturingDate", - "dateTime", - "2014-10-11T13:45:30", - "/products/GetProductByManufacturingDate/2014-10-11T13%3A45%3A30" - }; - - // Conventional Route, id:guid? constraint - yield return new object[] - { - "Store", - "GetStoreById", - "id", - "691cf17a-791b-4af8-99fd-e739e168170f", - "/store/GetStoreById/691cf17a-791b-4af8-99fd-e739e168170f" - }; - } - } - - [Theory] - [MemberData(nameof(QueryParameters))] - public async Task GetGeneratedLink( - string controller, - string action, - string parameterName, - string parameterValue, - string expectedLink) - { - // Arrange & Act - string url; - if (parameterName == null) - { - url = string.Format( - "{0}newController={1}&newAction={2}", - "http://localhost/products/GetGeneratedLink?", - controller, - action); - } - else - { - url = string.Format( - "{0}newController={1}&newAction={2}&{3}={4}", - "http://localhost/products/GetGeneratedLink?", - controller, - action, - parameterName, - parameterValue); - } - - var response = await Client.GetAsync(url); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - Assert.Equal(expectedLink, body); - } - - private async Task> GetResponseValues(HttpResponseMessage response) - { - var body = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject>(body); - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/JsonPatchSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/JsonPatchSampleTest.cs deleted file mode 100644 index 61104c9881..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/JsonPatchSampleTest.cs +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using JsonPatchSample.Web.Models; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class JsonPatchSampleTest : IClassFixture> - { - public JsonPatchSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_ValidAddOperation_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"add\", " + - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderName\": \"Name2\" }}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - var customer = JsonConvert.DeserializeObject(body); - Assert.Equal("Name2", customer.Orders[2].OrderName); - } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_ValidReplaceOperation_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"replace\", " + - "\"path\": \"Orders/0/OrderName\", " + - "\"value\": \"ReplacedOrder\" }]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - var customer = JsonConvert.DeserializeObject(body); - Assert.Equal("ReplacedOrder", customer.Orders[0].OrderName); - } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_ValidCopyOperation_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"copy\", " + - "\"path\": \"Orders/1/OrderName\", " + - "\"from\": \"Orders/0/OrderName\"}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - var customer = JsonConvert.DeserializeObject(body); - Assert.Equal("Order0", customer.Orders[1].OrderName); - } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_ValidMoveOperation_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"move\", " + - "\"path\": \"Orders/1/OrderName\", " + - "\"from\": \"Orders/0/OrderName\"}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - - var customer = JsonConvert.DeserializeObject(body); - Assert.Equal("Order0", customer.Orders[1].OrderName); - Assert.Null(customer.Orders[0].OrderName); - } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_ValidRemoveOperation_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"remove\", " + - "\"path\": \"Orders/1/OrderName\"}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - var customer = JsonConvert.DeserializeObject(body); - Assert.Null(customer.Orders[1].OrderName); - } - - [Theory] - [InlineData("http://localhost/jsonpatch/JsonPatchWithoutModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelState")] - [InlineData("http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch")] - public async Task JsonPatch_MultipleValidOperations_Success(string url) - { - // Arrange - var input = "[{ \"op\": \"add\", "+ - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderName\": \"Name2\" }}, " + - "{\"op\": \"copy\", " + - "\"from\": \"Orders/2\", " + - "\"path\": \"Orders/3\" }, " + - "{\"op\": \"replace\", " + - "\"path\": \"Orders/2/OrderName\", " + - "\"value\": \"ReplacedName\" }]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - var customer = JsonConvert.DeserializeObject(body); - Assert.Equal("ReplacedName", customer.Orders[2].OrderName); - Assert.Equal("Name2", customer.Orders[3].OrderName); - } - - public static IEnumerable InvalidJsonPatchData - { - get - { - return new[] - { - new object[] { - "http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch", - "[{ \"op\": \"add\", " + - "\"path\": \"Orders/5\", " + - "\"value\": { \"OrderName\": \"Name5\" }}]", - "{\"Patch.Customer\":[\"For operation 'add' on array property at path " + - "'Orders/5', the index is larger than the array size.\"]}" - }, - new object[] { - "http://localhost/jsonpatch/JsonPatchWithModelState", - "[{ \"op\": \"add\", " + - "\"path\": \"Orders/5\", " + - "\"value\": { \"OrderName\": \"Name5\" }}]", - "{\"Customer\":[\"For operation 'add' on array property at path " + - "'Orders/5', the index is larger than the array size.\"]}" - }, - new object[] { - "http://localhost/jsonpatch/JsonPatchWithModelStateAndPrefix?prefix=Patch", - "[{ \"op\": \"add\", " + - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderName\": \"Name2\" }}, " + - "{\"op\": \"copy\", " + - "\"from\": \"Orders/4\", " + - "\"path\": \"Orders/3\" }, " + - "{\"op\": \"replace\", " + - "\"path\": \"Orders/2/OrderName\", " + - "\"value\": \"ReplacedName\" }]", - "{\"Patch.Customer\":[\"For operation 'copy' on array property at path " + - "'Orders/4', the index is larger than the array size.\"]}" - }, - new object[] { - "http://localhost/jsonpatch/JsonPatchWithModelState", - "[{ \"op\": \"add\", " + - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderName\": \"Name2\" }}, " + - "{\"op\": \"copy\", " + - "\"from\": \"Orders/4\", " + - "\"path\": \"Orders/3\" }, " + - "{\"op\": \"replace\", " + - "\"path\": \"Orders/2/OrderName\", " + - "\"value\": \"ReplacedName\" }]", - "{\"Customer\":[\"For operation 'copy' on array property at path " + - "'Orders/4', the index is larger than the array size.\"]}" - } - }; - } - } - - [Theory, MemberData("InvalidJsonPatchData")] - public async Task JsonPatch_InvalidOperations_failure(string url, string input, string errorMessage) - { - // Arrange - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri(url) - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - Assert.Equal(errorMessage, body); - } - - [Fact] - public async Task JsonPatch_InvalidData_FormatterErrorInModelState_Failure() - { - // Arrange - var input = "{ \"op\": \"add\", " + - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderName\": \"Name2\" }}"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri("http://localhost/jsonpatch/JsonPatchWithModelState") - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - Assert.Equal("{\"\":[\"The input was not valid.\"]}", body); - } - - [Fact] - public async Task JsonPatch_JsonConverterOnProperty_Success() - { - // Arrange - var input = "[{ \"op\": \"add\", " + - "\"path\": \"Orders/2\", " + - "\"value\": { \"OrderType\": \"Type2\" }}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri("http://localhost/jsonpatch/JsonPatchWithoutModelState") - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - dynamic d = JObject.Parse(body); - Assert.Equal("OrderTypeSetInConverter", (string)d.Orders[2].OrderType); - } - - [Fact] - public async Task JsonPatch_JsonConverterOnClass_Success() - { - // Arrange - var input = "[{ \"op\": \"add\", " + - "\"path\": \"ProductCategory\", " + - "\"value\": { \"CategoryName\": \"Name2\" }}]"; - var request = new HttpRequestMessage - { - Content = new StringContent(input, Encoding.UTF8, "application/json-patch+json"), - Method = new HttpMethod("PATCH"), - RequestUri = new Uri("http://localhost/jsonpatch/JsonPatchForProduct") - }; - - // Act - var response = await Client.SendAsync(request); - - // Assert - var body = await response.Content.ReadAsStringAsync(); - dynamic d = JObject.Parse(body); - Assert.Equal("CategorySetInConverter", (string)d.ProductCategory.CategoryName); - - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/LocalizationSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/LocalizationSampleTest.cs deleted file mode 100644 index a65edd7c0c..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/LocalizationSampleTest.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Net.Http; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Localization; -using Microsoft.AspNetCore.Testing; -using Microsoft.Net.Http.Headers; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class LocalizationSampleTest : IClassFixture> - { - public LocalizationSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - public static IEnumerable LocalizationData - { - get - { - var expected1 = -@"en-gb-index -partial -mypartial -"; - - yield return new[] { "en-GB", expected1 }; - - var expected2 = -@"fr-index -fr-partial -mypartial -"; - yield return new[] { "fr", expected2 }; - - if (!TestPlatformHelper.IsMono) - { - // https://github.com/aspnet/Mvc/issues/2759 - var expected3 = - @"index -partial -mypartial -"; - yield return new[] { "!-invalid-!", expected3 }; - } - } - } - - [Theory] - [MemberData(nameof(LocalizationData))] - public async Task Localization_SuffixViewName(string value, string expected) - { - // Arrange - var cultureCookie = "c=" + value + "|uic=" + value; - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/"); - request.Headers.Add( - "Cookie", - new CookieHeaderValue(CookieRequestCultureProvider.DefaultCookieName, cultureCookie).ToString()); - - // Act - var response = await Client.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(expected, body.Trim(), ignoreLineEndingDifferences: true); - } - - public static IEnumerable LocalizationResourceData - { - get - { - var expected1 = - "Hello there!!" + Environment.NewLine + - "Learn More" + Environment.NewLine + - "Hi John ! You are in 2015 year and today is Thursday"; - - yield return new[] { "en-GB", expected1 }; - - var expected2 = - "Bonjour!" + Environment.NewLine + - "apprendre Encore Plus" + Environment.NewLine + - "Salut John ! Vous êtes en 2015 an aujourd'hui est Thursday"; - yield return new[] { "fr", expected2 }; - } - } - - [Theory] - [MemberData(nameof(LocalizationResourceData))] - public async Task Localization_Resources_ReturnExpectedValues(string value, string expected) - { - // Arrange - var cultureCookie = "c=" + value + "|uic=" + value; - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Home/Locpage"); - request.Headers.Add( - "Cookie", - new CookieHeaderValue(CookieRequestCultureProvider.DefaultCookieName, cultureCookie).ToString()); - - // Act - var response = await Client.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(expected, body.Trim()); - } - - [Fact] - public async Task Localization_InvalidModel_ValidationAttributes_ReturnsLocalizedErrorMessage() - { - // Arrange - var expected = -@"Nom non valide. Longueur minimale de nom est 6 -Nom du produit est invalide -
-
Nom non valide. Longueur minimale de nom est 6
- -
-
Nom du produit est invalide
"; - - var cultureCookie = "c=fr|uic=fr"; - var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Home/GetInvalidUser"); - request.Headers.Add( - "Cookie", - new CookieHeaderValue(CookieRequestCultureProvider.DefaultCookieName, cultureCookie).ToString()); - - // Act - var response = await Client.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(expected, body.Trim(), ignoreLineEndingDifferences: true); - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/MvcSandboxTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/MvcSandboxTest.cs index 5ddca16f69..cf17224c9a 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/MvcSandboxTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/MvcSandboxTest.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Net; using System.Net.Http; using System.Threading.Tasks; using Xunit; @@ -17,29 +16,14 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public HttpClient Client { get; } - [Theory] - [InlineData("")] // Shared/MyView.cshtml - [InlineData("/")] // Shared/MyView.cshtml - [InlineData("/Home/Index")] // Shared/MyView.cshtml - public async Task Home_Pages_ReturnSuccess(string path) - { - // Arrange & Act - var response = await Client.GetAsync("http://localhost" + path); - - // Assert - Assert.NotNull(response); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - } - [Fact] - public async Task Home_NotFoundAction_Returns404() + public async Task Home_Pages_ReturnSuccess() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/Home/NotFound"); + var response = await Client.GetStringAsync("http://localhost"); // Assert - Assert.NotNull(response); - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + Assert.Contains("This sandbox should give you a quick view of a basic MVC application.", response); } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/SubAreaTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/SubAreaTests.cs deleted file mode 100644 index 6e9997498a..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/SubAreaTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class SubAreaTests : IClassFixture> - { - public SubAreaTests(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task SubArea_Menu() - { - // Arrange & Act - var response = await Client.GetAsync("/Restaurant/Menu/Home/Index"); - var content = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("Item 1", content); - } - - [Fact] - public async Task SubArea_Hours() - { - // Arrange & Act - var response = await Client.GetAsync("/Restaurant/Hours/Home/Index"); - var content = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("9-5 M-F", content); - } - - [Fact] - public async Task SubArea_Home() - { - // Arrange & Act - var response = await Client.GetAsync("/"); - var content = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("Areas", content); - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/TagHelperSampleTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/TagHelperSampleTest.cs deleted file mode 100644 index d7280db274..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/TagHelperSampleTest.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) .NET Foundation. 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 System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Reflection; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.FunctionalTests -{ - public class TagHelperSampleTest : IClassFixture> - { - public TagHelperSampleTest(MvcSampleFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - [Fact] - public async Task HomeController_Index_ReturnsExpectedContent() - { - // Arrange - var resetResponse = await Client.PostAsync("http://localhost/Home/Reset", content: null); - - // Guard 1 (start from scratch) - AssertRedirectsToHome(resetResponse); - - var createBillyContent = CreateUserFormContent("Billy", "2000-11-28", 0, "hello"); - var createBillyResponse = await Client.PostAsync("http://localhost/Home/Create", createBillyContent); - - // Guard 2 (ensure user 0 exists) - AssertRedirectsToHome(createBillyResponse); - - var createBobbyContent = CreateUserFormContent("Bobby", "1999-10-27", 1, "howdy"); - var createBobbyResponse = await Client.PostAsync("http://localhost/Home/Create", createBobbyContent); - - // Guard 3 (ensure user 1 exists) - AssertRedirectsToHome(createBobbyResponse); - - var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8"); - var outputFile = "compiler/resources/TagHelperSample.Web.Home.Index.html"; - var resourceAssembly = typeof(TagHelperSampleTest).GetTypeInfo().Assembly; - var expectedContent = await ResourceFile.ReadResourceAsync(resourceAssembly, outputFile, sourceFile: false); - - // Act - var response = await Client.GetAsync("http://localhost/"); - var responseContent = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); - -#if GENERATE_BASELINES - ResourceFile.UpdateFile(resourceAssembly, outputFile, expectedContent, responseContent); -#else - Assert.Equal( - PlatformNormalizer.NormalizeContent(expectedContent), - responseContent, - ignoreLineEndingDifferences: true); -#endif - } - - [Fact] - public async Task HomeController_Index_ReturnsExpectedContent_AfterReset() - { - // Arrange - var resetResponse = await Client.PostAsync("http://localhost/Home/Reset", content: null); - - // Guard (start from scratch) - AssertRedirectsToHome(resetResponse); - - var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8"); - var outputFile = "compiler/resources/TagHelperSample.Web.Home.Index-Reset.html"; - var resourceAssembly = typeof(TagHelperSampleTest).GetTypeInfo().Assembly; - var expectedContent = await ResourceFile.ReadResourceAsync(resourceAssembly, outputFile, sourceFile: false); - - // Act - var response = await Client.GetAsync("http://localhost/"); - var responseContent = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); - -#if GENERATE_BASELINES - ResourceFile.UpdateFile(resourceAssembly, outputFile, expectedContent, responseContent); -#else - Assert.Equal(expectedContent, responseContent, ignoreLineEndingDifferences: true); -#endif - } - - [Fact] - public async Task HomeController_Create_Get_ReturnsSuccess() - { - // Act - var response = await Client.GetAsync("http://localhost/Home/Create"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - } - - [Fact] - public async Task HomeController_Create_Post_ReturnsSuccess() - { - // Arrange - var createBillyContent = CreateUserFormContent("Billy", "2000-11-30", 0, "hello"); - - // Act - var response = await Client.PostAsync("http://localhost/Home/Create", createBillyContent); - - // Assert - AssertRedirectsToHome(response); - } - - [Fact] - public async Task HomeController_Edit_Get_ReturnsSuccess() - { - // Arrange - var createBillyContent = CreateUserFormContent("Billy", "2000-11-30", 0, "hello"); - var createBilly = await Client.PostAsync("http://localhost/Home/Create", createBillyContent); - - // Guard (ensure user 0 exists) - AssertRedirectsToHome(createBilly); - - // Act - var response = await Client.GetAsync("http://localhost/Home/Edit/0"); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - } - - [Fact] - public async Task HomeController_Edit_Post_ReturnsSuccess() - { - // Arrange - var createBillyContent = CreateUserFormContent("Billy", "2000-11-30", 0, "hello"); - var createBilly = await Client.PostAsync("http://localhost/Home/Create", createBillyContent); - - // Guard (ensure user 0 exists) - AssertRedirectsToHome(createBilly); - - var changeBillyContent = CreateUserFormContent("Bobby", "1999-11-30", 1, "howdy"); - - // Act - var changeBilly = await Client.PostAsync("http://localhost/Home/Edit/0", changeBillyContent); - - // Assert - AssertRedirectsToHome(changeBilly); - } - - [Fact] - public async Task HomeController_Reset_ReturnsSuccess() - { - // Arrange and Act - var response = await Client.PostAsync("http://localhost/Home/Reset", content: null); - - // Assert - AssertRedirectsToHome(response); - } - - public static TheoryData MoviesControllerPageData - { - get - { - return new TheoryData>> - { - async (client) => await client.GetAsync("http://localhost/Movies"), - async (client) => await client.PostAsync( - "http://localhost/Movies/UpdateMovieRatings", - new FormUrlEncodedContent(Enumerable.Empty>())), - async (client) => await client.PostAsync( - "http://localhost/Movies/UpdateCriticsQuotes", - new FormUrlEncodedContent(Enumerable.Empty>())), - async (client) => - { - await client.PostAsync( - "http://localhost/Movies/UpdateCriticsQuotes", - new FormUrlEncodedContent(Enumerable.Empty>())); - await client.PostAsync( - "http://localhost/Movies/UpdateCriticsQuotes", - new FormUrlEncodedContent(Enumerable.Empty>())); - - return await client.GetAsync("http://localhost/Movies/Index"); - } - }; - } - } - - [Theory] - [MemberData(nameof(MoviesControllerPageData))] - public async Task MoviesController_Pages_ReturnSuccess(Func> requestPage) - { - // Act - var response = await requestPage(Client); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - } - - [Fact] - public async Task TagHelperController_ConditionalComment_ReturnsExpectedContent() - { - // Arrange - var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8"); - var outputFile = "compiler/resources/TagHelperSample.Web.TagHelper.ConditionalComment.html"; - var resourceAssembly = typeof(TagHelperSampleTest).GetTypeInfo().Assembly; - var expectedContent = await ResourceFile.ReadResourceAsync(resourceAssembly, outputFile, sourceFile: false); - - // Act - var response = await Client.GetAsync("http://localhost/TagHelper/ConditionalComment"); - var responseContent = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedMediaType, response.Content.Headers.ContentType); - -#if GENERATE_BASELINES - ResourceFile.UpdateFile(resourceAssembly, outputFile, expectedContent, responseContent); -#else - Assert.Equal(expectedContent, responseContent, ignoreLineEndingDifferences: true); -#endif - } - - private static void AssertRedirectsToHome(HttpResponseMessage response) - { - Assert.Equal(HttpStatusCode.Redirect, response.StatusCode); - var redirectLocations = response.Headers.GetValues("Location"); - var redirectsTo = Assert.Single(redirectLocations); - Assert.Equal("/", redirectsTo, StringComparer.Ordinal); - } - - private static HttpContent CreateUserFormContent( - string name, - string dateOfBirth, - int yearsEmployeed, - string blurb) - { - var form = new List>() - { - new KeyValuePair("Name", name), - new KeyValuePair("DateOfBirth", dateOfBirth), - new KeyValuePair("YearsEmployeed", yearsEmployeed.ToString()), - new KeyValuePair("Blurb", blurb), - }; - var content = new FormUrlEncodedContent(form); - - return content; - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index-Reset.html b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index-Reset.html deleted file mode 100644 index 23fa0b6c19..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index-Reset.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - -

Index

-

- Create New -

- - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index.html b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index.html deleted file mode 100644 index 036014f887..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.Home.Index.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - -

Index

-
-
- - -
-
- - -
-
- - -
-
- - -
-

- Edit -

-
- - -
-
- - -
-
- - -
-
- - -
-

- Edit -

-
-

- Create New -

- - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.TagHelper.ConditionalComment.html b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.TagHelper.ConditionalComment.html deleted file mode 100644 index 2f335e19bc..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelperSample.Web.TagHelper.ConditionalComment.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - -

Content visible to all browsers newer than Internet Explorer 7.

- - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json index 4c7e306e30..8f3f31bb14 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json @@ -11,23 +11,16 @@ }, "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1-*", - "ActionConstraintSample.Web": "1.0.0", "ApiExplorerWebSite": "1.0.0", "ApplicationModelWebSite": "1.0.0", "BasicWebSite": "1.0.0", "ControllersFromServicesWebSite": "1.0.0", "CorsWebSite": "1.0.0", - "CustomRouteSample.Web": "1.0.0", - "EmbeddedViewSample.Web": "1.0.0", "ErrorPageMiddlewareWebSite": "1.0.0", "FilesWebSite": "1.0.0", "FiltersWebSite": "1.0.0", - "FormatFilterSample.Web": "1.0.0-*", "FormatterWebSite": "1.0.0", "HtmlGenerationWebSite": "1.0.0", - "InlineConstraintSample.Web": "1.0.0", - "JsonPatchSample.Web": "1.0.0", - "LocalizationSample.Web": "1.0.0", "Microsoft.AspNetCore.Mvc": "1.0.0-*", "Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0-*", "Microsoft.AspNetCore.Mvc.TestCommon": { @@ -40,14 +33,11 @@ "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Testing": "1.0.0-*", "MvcSandbox": "1.0.0", - "MvcSubAreaSample.Web": "1.0.0", "RazorPageExecutionInstrumentationWebSite": "1.0.0", "RazorWebSite": "1.0.0", "RoutingWebSite": "1.0.0", "SimpleWebSite": "1.0.0", - "TagHelperSample.Web": "1.0.0", "TagHelpersWebSite": "1.0.0", - "UrlHelperSample.Web": "1.0.0", "VersioningWebSite": "1.0.0", "WebApiCompatShimWebSite": "1.0.0", "XmlFormattersWebSite": "1.0.0"