diff --git a/Mvc.sln b/Mvc.sln index 09ab6c61de..2a7d8b9d79 100644 --- a/Mvc.sln +++ b/Mvc.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24627.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}" EndProject @@ -74,8 +74,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApiCompatShimWebSite", " EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.WebApiCompatShimTest", "test\Microsoft.AspNet.Mvc.WebApiCompatShimTest\Microsoft.AspNet.Mvc.WebApiCompatShimTest.xproj", "{5DE8E4D9-AACD-4B5F-819F-F091383FB996}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ViewComponentWebSite", "test\WebSites\ViewComponentWebSite\ViewComponentWebSite.xproj", "{24B59501-5F37-4129-96E6-F02EC34C7E2C}" -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.AspNet.Mvc.TagHelpers", "src\Microsoft.AspNet.Mvc.TagHelpers\Microsoft.AspNet.Mvc.TagHelpers.xproj", "{B2347320-308E-4D2B-AEC8-005DFA68B0C9}" @@ -474,16 +472,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 - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Release|Any CPU.Build.0 = Release|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {24B59501-5F37-4129-96E6-F02EC34C7E2C}.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 @@ -1098,7 +1086,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} - {24B59501-5F37-4129-96E6-F02EC34C7E2C} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} {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} diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewComponentTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewComponentTests.cs deleted file mode 100644 index b289cd8e7f..0000000000 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewComponentTests.cs +++ /dev/null @@ -1,116 +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.Net.Http; -using System.Threading.Tasks; -using Xunit; - -namespace Microsoft.AspNet.Mvc.FunctionalTests -{ - public class ViewComponentTests : IClassFixture> - { - public ViewComponentTests(MvcTestFixture fixture) - { - Client = fixture.Client; - } - - public HttpClient Client { get; } - - public static IEnumerable ViewViewComponents_AreRenderedCorrectlyData - { - get - { - yield return new[] - { - "ViewWithAsyncComponents", - @"value-from-component value-from-view -ViewWithAsyncComponents InvokeAsync: hello from viewdatacomponent" - }; - - yield return new[] - { - "ViewWithSyncComponents", - @"value-from-component value-from-view -ViewWithSyncComponents Invoke: hello from viewdatacomponent" - }; - } - } - - [Theory] - [MemberData(nameof(ViewViewComponents_AreRenderedCorrectlyData))] - public async Task ViewViewComponents_AreRenderedCorrectly(string actionName, string expected) - { - // Arrange & Act - var body = await Client.GetStringAsync("http://localhost/Home/" + actionName); - - // Assert - Assert.Equal(expected, body.Trim(), ignoreLineEndingDifferences: true); - } - - [Fact] - public async Task ViewComponents_SupportsValueType() - { - // Arrange & Act - var body = await Client.GetStringAsync("http://localhost/Home/ViewWithIntegerViewComponent"); - - // Assert - Assert.Equal("10", body.Trim()); - } - - [Fact] - public async Task ViewComponents_InvokeWithViewComponentResult() - { - // Arrange & Act - var body = await Client.GetStringAsync("http://localhost/ViewComponentResult/Invoke?number=31"); - - // Assert - Assert.Equal("31", body.Trim()); - } - - [Theory] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingWhere", "Where")] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingSelect", "Select")] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingSelectMany", "SelectMany")] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingTake", "Take")] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingTakeWhile", "TakeWhile")] - [InlineData("http://localhost/Home/ViewComponentWithEnumerableModelUsingUnion", "Union")] - public async Task ViewComponents_SupportsEnumerableModel(string url, string linqQueryType) - { - // Arrange & Act - // https://github.com/aspnet/Mvc/issues/1354 - // The invoked ViewComponent/View has a model which is an internal type implementing Enumerable. - // For ex - TestEnumerableObject.Select(t => t) returns WhereSelectListIterator - var body = await Client.GetStringAsync(url); - - // Assert - Assert.Equal("

Hello

World

Sample

Test

" - + "

Hello

World

" + linqQueryType + "

Test

", body.Trim()); - } - - [Theory] - [InlineData("ViewComponentWebSite.Namespace1.SameName")] - [InlineData("ViewComponentWebSite.Namespace2.SameName")] - public async Task ViewComponents_FullName(string name) - { - // Arrange & Act - var body = await Client.GetStringAsync("http://localhost/FullName/Invoke?name=" + name); - - // Assert - Assert.Equal(name, body.Trim()); - } - - [Fact] - public async Task ViewComponents_ShortNameUsedForViewLookup() - { - // Arrange - var name = "ViewComponentWebSite.Integer"; - - // Act - var body = await Client.GetStringAsync("http://localhost/FullName/Invoke?name=" + name); - - // Assert - Assert.Equal("17", body.Trim()); - } - } -} diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/project.json b/test/Microsoft.AspNet.Mvc.FunctionalTests/project.json index 18f2979803..25d0e214d8 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/project.json +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/project.json @@ -58,7 +58,6 @@ "ValidationWebSite": "1.0.0", "ValueProvidersWebSite": "1.0.0", "VersioningWebSite": "1.0.0", - "ViewComponentWebSite": "1.0.0", "WebApiCompatShimWebSite": "1.0.0", "XmlFormattersWebSite": "1.0.0", "xunit.runner.aspnet": "2.0.0-aspnet-*" diff --git a/test/WebSites/ViewComponentWebSite/EnumerableViewComponent.cs b/test/WebSites/ViewComponentWebSite/EnumerableViewComponent.cs deleted file mode 100644 index 5bb38f81e0..0000000000 --- a/test/WebSites/ViewComponentWebSite/EnumerableViewComponent.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.Collections.Generic; -using System.Linq; -using Microsoft.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class EnumerableViewComponent : ViewComponent - { - public IViewComponentResult Invoke(string linqQueryType) - { - var modelList = new List() - { - new SampleModel { Prop1 = "Hello", Prop2 = "World" }, - new SampleModel { Prop1 = linqQueryType, Prop2 = "Test" }, - }; - - switch (linqQueryType) { - case "Where": - return View(modelList.Where(e => e != null)); - - case "Take": - return View(modelList.Take(2)); - - case "TakeWhile": - return View(modelList.TakeWhile(a => a != null)); - - case "Union": - return View(modelList.Union(modelList)); - - case "SelectMany": - var selectManySampleModelList = new List - { - new SelectManySampleModel { - TestModel = - new List { new SampleModel { Prop1 = "Hello", Prop2 = "World" } } }, - new SelectManySampleModel { - TestModel = - new List { new SampleModel{ Prop1 = linqQueryType, Prop2 = "Test" } } } - }; - - return View(selectManySampleModelList.SelectMany(a => a.TestModel)); - }; - - return View(modelList.Select(e => e)); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/FullNameController.cs b/test/WebSites/ViewComponentWebSite/FullNameController.cs deleted file mode 100644 index 5a5905f48b..0000000000 --- a/test/WebSites/ViewComponentWebSite/FullNameController.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.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class FullNameController : Controller - { - public IActionResult Invoke(string name) - { - ViewBag.Name = name; - return View(); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/HomeController.cs b/test/WebSites/ViewComponentWebSite/HomeController.cs deleted file mode 100644 index 12a1d5e36a..0000000000 --- a/test/WebSites/ViewComponentWebSite/HomeController.cs +++ /dev/null @@ -1,84 +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.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class HomeController : Controller - { - private IEnumerable ModelList { get; set; } - - public HomeController() - { - ModelList = new List() - { - new SampleModel { Prop1 = "Hello", Prop2 = "World" }, - new SampleModel { Prop1 = "Sample", Prop2 = "Test" }, - }; - } - - public IActionResult ViewWithAsyncComponents() - { - return View(); - } - - public IActionResult ViewWithSyncComponents() - { - return View(); - } - - public IActionResult ViewWithIntegerViewComponent() - { - return View(); - } - - public IActionResult ViewComponentWithEnumerableModelUsingWhere() - { - ViewBag.LinqQueryType = "Where"; - return View("ViewComponentWithEnumerableModel", ModelList.Where(a => a != null)); - } - - public IActionResult ViewComponentWithEnumerableModelUsingSelect() - { - ViewBag.LinqQueryType = "Select"; - return View("ViewComponentWithEnumerableModel", ModelList.Select(a => a)); - } - - public IActionResult ViewComponentWithEnumerableModelUsingTake() - { - ViewBag.LinqQueryType = "Take"; - return View("ViewComponentWithEnumerableModel", ModelList.Take(2)); - } - - public IActionResult ViewComponentWithEnumerableModelUsingTakeWhile() - { - ViewBag.LinqQueryType = "TakeWhile"; - return View("ViewComponentWithEnumerableModel", ModelList.TakeWhile(a => a != null)); - } - - public IActionResult ViewComponentWithEnumerableModelUsingUnion() - { - ViewBag.LinqQueryType = "Union"; - return View("ViewComponentWithEnumerableModel", ModelList.Union(ModelList)); - } - - public IActionResult ViewComponentWithEnumerableModelUsingSelectMany() - { - var selectManySampleModelList = new List - { - new SelectManySampleModel { - TestModel = - new List { ModelList.ElementAt(0) } }, - new SelectManySampleModel { - TestModel = - new List { ModelList.ElementAt(1) } } - }; - - ViewBag.LinqQueryType = "SelectMany"; - return View("ViewComponentWithEnumerableModel", selectManySampleModelList.SelectMany(s => s.TestModel)); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/IntegerViewComponent.cs b/test/WebSites/ViewComponentWebSite/IntegerViewComponent.cs deleted file mode 100644 index dd0883751d..0000000000 --- a/test/WebSites/ViewComponentWebSite/IntegerViewComponent.cs +++ /dev/null @@ -1,20 +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.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class IntegerViewComponent : ViewComponent - { - public IViewComponentResult Invoke() - { - return Invoke(17); - } - - public IViewComponentResult Invoke(int valueFromView) - { - return View(valueFromView); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Namespace1/SameNameViewComponent.cs b/test/WebSites/ViewComponentWebSite/Namespace1/SameNameViewComponent.cs deleted file mode 100644 index 6286b08c0b..0000000000 --- a/test/WebSites/ViewComponentWebSite/Namespace1/SameNameViewComponent.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.AspNet.Mvc; - -namespace ViewComponentWebSite.Namespace1 -{ - // The full name is different here from the other view component with the same short name. - public class SameNameViewComponent : ViewComponent - { - public string Invoke() - { - return "ViewComponentWebSite.Namespace1.SameName"; - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Namespace2/SameNameViewComponent.cs b/test/WebSites/ViewComponentWebSite/Namespace2/SameNameViewComponent.cs deleted file mode 100644 index 1e782de3fa..0000000000 --- a/test/WebSites/ViewComponentWebSite/Namespace2/SameNameViewComponent.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.AspNet.Mvc; - -namespace ViewComponentWebSite.Namespace2 -{ - // The full name is different here from the other view component with the same short name. - public class SameNameViewComponent : ViewComponent - { - public string Invoke() - { - return "ViewComponentWebSite.Namespace2.SameName"; - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/SampleModel.cs b/test/WebSites/ViewComponentWebSite/SampleModel.cs deleted file mode 100644 index 7b9248ab7f..0000000000 --- a/test/WebSites/ViewComponentWebSite/SampleModel.cs +++ /dev/null @@ -1,19 +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.Threading.Tasks; - -namespace ViewComponentWebSite -{ - public class SampleModel - { - public string Prop1 { get; set; } - - public string Prop2 { get; set; } - - public Task GetValueAsync() - { - return Task.FromResult(Prop1 + " " + Prop2); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/SelectManySampleModel.cs b/test/WebSites/ViewComponentWebSite/SelectManySampleModel.cs deleted file mode 100644 index f708bc5a0b..0000000000 --- a/test/WebSites/ViewComponentWebSite/SelectManySampleModel.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. - -using System.Collections.Generic; - -namespace ViewComponentWebSite -{ - public class SelectManySampleModel - { - public List TestModel { get; set; } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Startup.cs b/test/WebSites/ViewComponentWebSite/Startup.cs deleted file mode 100644 index 917514b72f..0000000000 --- a/test/WebSites/ViewComponentWebSite/Startup.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.AspNet.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace ViewComponentWebSite -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - // Add MVC services to the services container - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app) - { - app.UseCultureReplacer(); - - app.UseMvcWithDefaultRoute(); - } - } -} diff --git a/test/WebSites/ViewComponentWebSite/TestViewComponent.cs b/test/WebSites/ViewComponentWebSite/TestViewComponent.cs deleted file mode 100644 index e2d07660b4..0000000000 --- a/test/WebSites/ViewComponentWebSite/TestViewComponent.cs +++ /dev/null @@ -1,20 +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.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class TestViewComponent : ViewComponent - { - public IViewComponentResult Invoke(string valueFromView) - { - var model = new SampleModel - { - Prop1 = "value-from-component", - Prop2 = valueFromView - }; - return View(model); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/ViewComponentResultController.cs b/test/WebSites/ViewComponentWebSite/ViewComponentResultController.cs deleted file mode 100644 index 656060385b..0000000000 --- a/test/WebSites/ViewComponentWebSite/ViewComponentResultController.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.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - public class ViewComponentResultController : Controller - { - public IActionResult Invoke(int number) - { - return ViewComponent("Integer", number); - } - } -} diff --git a/test/WebSites/ViewComponentWebSite/ViewComponentWebSite.xproj b/test/WebSites/ViewComponentWebSite/ViewComponentWebSite.xproj deleted file mode 100644 index e10a783e9e..0000000000 --- a/test/WebSites/ViewComponentWebSite/ViewComponentWebSite.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 24b59501-5f37-4129-96e6-f02ec34c7e2c - ..\..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\..\artifacts\bin\$(MSBuildProjectName)\ - - - 2.0 - 40957 - - - \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/ViewDataComponent.cs b/test/WebSites/ViewComponentWebSite/ViewDataComponent.cs deleted file mode 100644 index 507ba53559..0000000000 --- a/test/WebSites/ViewComponentWebSite/ViewDataComponent.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 System.Threading.Tasks; -using Microsoft.AspNet.Mvc; - -namespace ViewComponentWebSite -{ - [ViewComponent(Name = "ViewData")] - public class ViewDataComponent : ViewComponent - { - public IViewComponentResult Invoke() - { - ViewData["value-from-component"] = nameof(Invoke) + ": hello from viewdatacomponent"; - return View("ComponentThatReadsViewData"); - } - - public Task InvokeAsync() - { - ViewData["value-from-component"] = nameof(InvokeAsync) + ": hello from viewdatacomponent"; - var result = View("ComponentThatReadsViewData"); - return Task.FromResult(result); - } - } -} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/FullName/Invoke.cshtml b/test/WebSites/ViewComponentWebSite/Views/FullName/Invoke.cshtml deleted file mode 100644 index f87bef07aa..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/FullName/Invoke.cshtml +++ /dev/null @@ -1 +0,0 @@ -@Component.Invoke(ViewBag.Name) \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Enumerable/Default.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Enumerable/Default.cshtml deleted file mode 100644 index ce64a0f9f5..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Enumerable/Default.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@model IEnumerable -@foreach (var m in Model) -{

@m.Prop1

@m.Prop2

} \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Integer/Default.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Integer/Default.cshtml deleted file mode 100644 index 2ee120b02b..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Integer/Default.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@model int -@Model \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Test/Default.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Test/Default.cshtml deleted file mode 100644 index 67483c0672..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/Test/Default.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@model SampleModel -@await Model.GetValueAsync() \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/ViewData/ComponentThatReadsViewData.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/Components/ViewData/ComponentThatReadsViewData.cshtml deleted file mode 100644 index f74815c4ea..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/Components/ViewData/ComponentThatReadsViewData.cshtml +++ /dev/null @@ -1 +0,0 @@ -@ViewData["value-from-view"] @ViewData["value-from-component"] \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewComponentWithEnumerableModel.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/ViewComponentWithEnumerableModel.cshtml deleted file mode 100644 index adaa146307..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewComponentWithEnumerableModel.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@model IEnumerable -@foreach (var m in Model) -{

@m.Prop1

@m.Prop2

} -@Component.Invoke("Enumerable", ViewBag.LinqQueryType) \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithAsyncComponents.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithAsyncComponents.cshtml deleted file mode 100644 index b2afc51028..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithAsyncComponents.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@{ - ViewData["value-from-view"] = ViewContext.ActionDescriptor.Name; -} -@await Component.InvokeAsync("Test", "value-from-view") -@await Component.InvokeAsync("ViewData") \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithIntegerViewComponent.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithIntegerViewComponent.cshtml deleted file mode 100644 index b09c442b8e..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithIntegerViewComponent.cshtml +++ /dev/null @@ -1 +0,0 @@ -@Component.Invoke("Integer", 10) \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithSyncComponents.cshtml b/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithSyncComponents.cshtml deleted file mode 100644 index ae3da14d03..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/Shared/ViewWithSyncComponents.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@{ - ViewData["value-from-view"] = ViewContext.ActionDescriptor.Name; -} -@Component.Invoke("Test", "value-from-view") -@Component.Invoke("ViewData") diff --git a/test/WebSites/ViewComponentWebSite/Views/_ViewImports.cshtml b/test/WebSites/ViewComponentWebSite/Views/_ViewImports.cshtml deleted file mode 100644 index d6ce3cfe9b..0000000000 --- a/test/WebSites/ViewComponentWebSite/Views/_ViewImports.cshtml +++ /dev/null @@ -1 +0,0 @@ -@using ViewComponentWebSite \ No newline at end of file diff --git a/test/WebSites/ViewComponentWebSite/project.json b/test/WebSites/ViewComponentWebSite/project.json deleted file mode 100644 index 14c1cb9408..0000000000 --- a/test/WebSites/ViewComponentWebSite/project.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000" - }, - "dependencies": { - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Mvc": "6.0.0-*", - "Microsoft.AspNet.Mvc.TestConfiguration": "1.0.0", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*", - "Microsoft.AspNet.StaticFiles": "1.0.0-*" - }, - "frameworks": { - "dnx451": { }, - "dnxcore50": { } - }, - "webroot": "wwwroot" -} diff --git a/test/WebSites/ViewComponentWebSite/readme.md b/test/WebSites/ViewComponentWebSite/readme.md deleted file mode 100644 index d2d82919d1..0000000000 --- a/test/WebSites/ViewComponentWebSite/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -ViewComponentsWebSite -=== - -This web site illustrates how to use custom view components. diff --git a/test/WebSites/ViewComponentWebSite/wwwroot/HelloWorld.htm b/test/WebSites/ViewComponentWebSite/wwwroot/HelloWorld.htm deleted file mode 100644 index 3da1ec26e9..0000000000 --- a/test/WebSites/ViewComponentWebSite/wwwroot/HelloWorld.htm +++ /dev/null @@ -1 +0,0 @@ -HelloWorld