diff --git a/WebFx.sln b/WebFx.sln index bc4c442b21..7afc8f533f 100644 --- a/WebFx.sln +++ b/WebFx.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30313.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}" EndProject @@ -11,10 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.k10", "src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.k10.csproj", "{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample.net45", "samples\MvcSample\MvcSample.net45.csproj", "{501817DD-8143-4A50-888D-99896A82CD12}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample.k10", "samples\MvcSample\MvcSample.k10.csproj", "{A7D7CD66-A407-4144-8AB7-07F895F87137}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.Host.net45", "src\Microsoft.AspNet.Mvc.Razor.Host\Microsoft.AspNet.Mvc.Razor.Host.net45.csproj", "{A25566C9-97C7-4770-BBC1-9B815D3B1380}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.Host.k10", "src\Microsoft.AspNet.Mvc.Razor.Host\Microsoft.AspNet.Mvc.Razor.Host.k10.csproj", "{613579ED-7B96-4F5C-8DBF-D2C580257BE2}" @@ -33,8 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net45", "net45", "{6C2EDE5B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net45", "net45", "{222CA408-93EE-473A-9325-D04989EC9FEF}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k10", "k10", "{CE037E26-9EB5-48E2-B73B-06C6FF6CC9F5}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.ModelBinding.Test.net45", "test\Microsoft.AspNet.Mvc.ModelBinding.Test\Microsoft.AspNet.Mvc.ModelBinding.Test.net45.csproj", "{42195A56-42C0-4CFF-A982-B6E24EFC6356}" @@ -75,14 +69,6 @@ Global {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Release|Any CPU.Build.0 = Release|Any CPU - {501817DD-8143-4A50-888D-99896A82CD12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {501817DD-8143-4A50-888D-99896A82CD12}.Debug|Any CPU.Build.0 = Debug|Any CPU - {501817DD-8143-4A50-888D-99896A82CD12}.Release|Any CPU.ActiveCfg = Release|Any CPU - {501817DD-8143-4A50-888D-99896A82CD12}.Release|Any CPU.Build.0 = Release|Any CPU - {A7D7CD66-A407-4144-8AB7-07F895F87137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7D7CD66-A407-4144-8AB7-07F895F87137}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7D7CD66-A407-4144-8AB7-07F895F87137}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7D7CD66-A407-4144-8AB7-07F895F87137}.Release|Any CPU.Build.0 = Release|Any CPU {A25566C9-97C7-4770-BBC1-9B815D3B1380}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A25566C9-97C7-4770-BBC1-9B815D3B1380}.Debug|Any CPU.Build.0 = Debug|Any CPU {A25566C9-97C7-4770-BBC1-9B815D3B1380}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -160,29 +146,26 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {222CA408-93EE-473A-9325-D04989EC9FEF} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {CE037E26-9EB5-48E2-B73B-06C6FF6CC9F5} = {DAAE4C74-D06F-4874-A166-33305D2643CE} - {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} - {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} - {A25566C9-97C7-4770-BBC1-9B815D3B1380} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {28AA31B2-6504-432D-8599-1501FE0B100A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {236CDB04-8FDA-4152-9A5B-7F98C19C663A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {365CA5C6-037D-4E6E-AF05-F5FA42E024EB} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {792E181C-7645-4268-A04F-DB134411AD74} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {64BD92BA-F313-496C-ACE6-B9C4C10C420E} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {10142178-F784-4E17-A583-E9A37A80EFAA} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} + {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} + {A25566C9-97C7-4770-BBC1-9B815D3B1380} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {613579ED-7B96-4F5C-8DBF-D2C580257BE2} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} {24947215-86AB-4DD0-B94E-88B1EC4DC877} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} + {28AA31B2-6504-432D-8599-1501FE0B100A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {DA65D56F-1C40-4D38-B1E0-BF9641A98C52} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {5E701B23-73E4-45D2-8521-1D7A94E152F1} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {BA88E212-5889-48DC-823F-A3A67DDEF123} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {D4576205-A5B5-4382-BB34-19DE9855FE94} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {501817DD-8143-4A50-888D-99896A82CD12} = {222CA408-93EE-473A-9325-D04989EC9FEF} - {688ABC8B-BFA9-4CFF-9458-A466FEBB0448} = {222CA408-93EE-473A-9325-D04989EC9FEF} - {A7D7CD66-A407-4144-8AB7-07F895F87137} = {CE037E26-9EB5-48E2-B73B-06C6FF6CC9F5} + {236CDB04-8FDA-4152-9A5B-7F98C19C663A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} + {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} + {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} + {222CA408-93EE-473A-9325-D04989EC9FEF} = {DAAE4C74-D06F-4874-A166-33305D2643CE} {42195A56-42C0-4CFF-A982-B6E24EFC6356} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {537CC0EE-4B62-4789-9AE9-94BE28E0D25A} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} + {688ABC8B-BFA9-4CFF-9458-A466FEBB0448} = {222CA408-93EE-473A-9325-D04989EC9FEF} + {5E701B23-73E4-45D2-8521-1D7A94E152F1} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} + {792E181C-7645-4268-A04F-DB134411AD74} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} + {BA88E212-5889-48DC-823F-A3A67DDEF123} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} + {64BD92BA-F313-496C-ACE6-B9C4C10C420E} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} + {10142178-F784-4E17-A583-E9A37A80EFAA} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} + {D4576205-A5B5-4382-BB34-19DE9855FE94} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} {3EB2CFF9-6E67-4C03-9AC4-2DD169024938} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {75A07B53-C5EE-4995-A55B-27562C23BCCD} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} diff --git a/samples/MvcSample/Filters/AgeEnhancerFilterAttribute.cs b/samples/MvcSample/Filters/AgeEnhancerFilterAttribute.cs deleted file mode 100644 index 7b21cb8e0e..0000000000 --- a/samples/MvcSample/Filters/AgeEnhancerFilterAttribute.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; - -namespace MvcSample.Filters -{ - public class AgeEnhancerAttribute : ActionFilterAttribute - { - public async override Task Invoke(ActionFilterContext context, Func next) - { - object age = null; - - if (context.ActionParameters.TryGetValue("age", out age)) - { - if (age is int) - { - var intAge = (int) age; - - if (intAge < 21) - { - intAge += 5; - } - else if (intAge > 30) - { - intAge = 29; - } - - context.ActionParameters["age"] = intAge; - } - } - - await next(); - } - } -} diff --git a/samples/MvcSample/Filters/InspectResultPageAttribute.cs b/samples/MvcSample/Filters/InspectResultPageAttribute.cs deleted file mode 100644 index a0a78f9faa..0000000000 --- a/samples/MvcSample/Filters/InspectResultPageAttribute.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; -using MvcSample.Models; - -namespace MvcSample.Filters -{ - public class InspectResultPageAttribute : ActionResultFilterAttribute - { - public async override Task Invoke(ActionResultFilterContext context, Func next) - { - ViewResult viewResult = context.Result as ViewResult; - - if (viewResult != null) - { - User user = viewResult.ViewData.Model as User; - - if (user != null) - { - user.Name += "**" + user.Name + "**"; - } - } - - await next(); - } - } -} diff --git a/samples/MvcSample/Filters/PassThroughAttribute.cs b/samples/MvcSample/Filters/PassThroughAttribute.cs deleted file mode 100644 index c6d8237785..0000000000 --- a/samples/MvcSample/Filters/PassThroughAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; - -namespace MvcSample -{ - public class PassThroughAttribute : AuthorizationFilterAttribute - { - public async override Task Invoke(AuthorizationFilterContext context, Func next) - { - await next(); - } - } -} diff --git a/samples/MvcSample/Filters/UserNameProvider.cs b/samples/MvcSample/Filters/UserNameProvider.cs deleted file mode 100644 index 303d2814b0..0000000000 --- a/samples/MvcSample/Filters/UserNameProvider.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; - -namespace MvcSample.Filters -{ - public class UserNameProvider : ActionFilterAttribute - { - private static readonly string[] _userNames = new[] { "Jon", "David", "Goliath" }; - private static int _index; - - public override async Task Invoke(ActionFilterContext context, Func next) - { - object originalUserName = null; - - context.ActionParameters.TryGetValue("userName", out originalUserName); - - var userName = originalUserName as string; - - if (string.IsNullOrWhiteSpace(userName)) - { - context.ActionParameters["userName"] = _userNames[(_index++)%3]; - } - - await next(); - } - } -} diff --git a/samples/MvcSample/FiltersController.cs b/samples/MvcSample/FiltersController.cs deleted file mode 100644 index 52e3d177f3..0000000000 --- a/samples/MvcSample/FiltersController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.AspNet.Mvc; -using MvcSample.Filters; -using MvcSample.Models; - -namespace MvcSample -{ - [ServiceFilter(typeof(PassThroughAttribute), Order = 1)] - [ServiceFilter(typeof(PassThroughAttribute))] - [PassThrough(Order = 0)] - [PassThrough(Order = 2)] - [InspectResultPage] - [UserNameProvider(Order = -1)] - public class FiltersController : Controller - { - private readonly User _user = new User() { Name = "User Name", Address = "Home Address" }; - - // TODO: Add a real filter here - [ServiceFilter(typeof(PassThroughAttribute))] - [AgeEnhancer] - public IActionResult Index(int age, string userName) - { - if (!string.IsNullOrEmpty(userName)) - { - _user.Name = userName; - } - - _user.Age = age; - - return View("MyView", _user); - } - } -} \ No newline at end of file diff --git a/samples/MvcSample/Home2Controller.cs b/samples/MvcSample/Home2Controller.cs deleted file mode 100644 index 659980acab..0000000000 --- a/samples/MvcSample/Home2Controller.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNet.Abstractions; -using Microsoft.AspNet.Mvc; -using MvcSample.Models; - -namespace MvcSample.RandomNameSpace -{ - public class Home2Controller - { - private User _user = new User() { Name = "User Name", Address = "Home Address" }; - - public Home2Controller(IActionResultHelper actionResultHelper) - { - Result = actionResultHelper; - } - - public IActionResultHelper Result { get; private set; } - - public HttpContext Context { get; set; } - - public string Index() - { - return "Hello World: my namespace is " + this.GetType().Namespace; - } - - public IActionResult Something() - { - return new ContentResult - { - Content = "Hello World From Content" - }; - } - - public IActionResult Hello() - { - return Result.Content("Hello World"); - } - - public void Raw() - { - Context.Response.WriteAsync("Hello World raw"); - } - - public IActionResult UserJson() - { - var jsonResult = Result.Json(_user); - jsonResult.Indent = false; - - return jsonResult; - } - - public User User() - { - return _user; - } - } -} \ No newline at end of file diff --git a/samples/MvcSample/HomeController.cs b/samples/MvcSample/HomeController.cs deleted file mode 100644 index 6843fdec4f..0000000000 --- a/samples/MvcSample/HomeController.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Microsoft.AspNet.Mvc; -using MvcSample.Models; - -namespace MvcSample -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View("MyView", User()); - } - - /// - /// Action that exercises query\form based model binding. - /// - public IActionResult SaveUser(User user) - { - return View("MyView", user); - } - - /// - /// Action that exercises input formatter - /// - public IActionResult Post([FromBody]User user) - { - return View("MyView", user); - } - - public IActionResult Something() - { - return new ContentResult - { - Content = "Hello World From Content" - }; - } - - public IActionResult Hello() - { - return Result.Content("Hello World"); - } - - public void Raw() - { - Context.Response.WriteAsync("Hello World raw"); - } - - public User User() - { - User user = new User() - { - Name = "My name", - Address = "My address" - }; - - return user; - } - - public IActionResult MyView() - { - return View(User()); - } - } -} \ No newline at end of file diff --git a/samples/MvcSample/LinkController.cs b/samples/MvcSample/LinkController.cs deleted file mode 100644 index 1f5c2f85a0..0000000000 --- a/samples/MvcSample/LinkController.cs +++ /dev/null @@ -1,33 +0,0 @@ - -using Microsoft.AspNet.Mvc; - -namespace MvcSample -{ - public class LinkController : Controller - { - public IActionResult Details() - { - return View(); - } - - public string About() - { - return Url.Action(null); - } - - public string Get() - { - return Url.Route(new { controller = "Home", action = "Details" }); - } - - public string Link1() - { - return Url.Action("Index", "Home"); - } - - public string Link2() - { - return Url.Action("Link2"); - } - } -} diff --git a/samples/MvcSample/Models/User.cs b/samples/MvcSample/Models/User.cs deleted file mode 100644 index 2ec732a48d..0000000000 --- a/samples/MvcSample/Models/User.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace MvcSample.Models -{ - public class User - { - [Required] - [MinLength(4)] - public string Name { get; set; } - public string Address { get; set; } - public int Age { get; set; } - } -} \ No newline at end of file diff --git a/samples/MvcSample/OverloadController.cs b/samples/MvcSample/OverloadController.cs deleted file mode 100644 index 79beee5025..0000000000 --- a/samples/MvcSample/OverloadController.cs +++ /dev/null @@ -1,30 +0,0 @@ - -using Microsoft.AspNet.Mvc; - -namespace MvcSample -{ - public class OverloadController - { - private readonly IActionResultHelper _result; - - public OverloadController(IActionResultHelper result) - { - _result = result; - } - - public IActionResult Get() - { - return _result.Content("Get()"); - } - - public IActionResult Get(int id) - { - return _result.Content("Get(id)"); - } - - public IActionResult Get(int id, string name) - { - return _result.Content("Get(id, name)"); - } - } -} diff --git a/samples/MvcSample/Program.cs b/samples/MvcSample/Program.cs deleted file mode 100644 index dfd898791c..0000000000 --- a/samples/MvcSample/Program.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Diagnostics; -using Microsoft.Net.Runtime; - -#if NET45 -using Microsoft.Owin.Hosting; - -#endif - -namespace MvcSample -{ - public class Program - { - const string baseUrl = "http://localhost:9001/"; - private readonly IServiceProvider _serviceProvider; - - public Program(IServiceProvider serviceProvider) - { - _serviceProvider = serviceProvider; - } - - public void Main() - { -#if NET45 - using (WebApp.Start(baseUrl, app => new Startup(_serviceProvider).Configuration(app))) - { - Console.WriteLine("Listening at {0}", baseUrl); - Process.Start(baseUrl); - Console.WriteLine("Press any key to exit"); - Console.ReadKey(); - } -#else - Console.WriteLine("Hello World"); -#endif - } - } -} \ No newline at end of file diff --git a/samples/MvcSample/Properties/AssemblyInfo.cs b/samples/MvcSample/Properties/AssemblyInfo.cs deleted file mode 100644 index 2740c73537..0000000000 --- a/samples/MvcSample/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MvcSample")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MvcSample")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d5a71550-dac9-4925-ad7c-f0fd3ccf5dab")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/MvcSample/SimplePocoController.cs b/samples/MvcSample/SimplePocoController.cs deleted file mode 100644 index d31e32e9b1..0000000000 --- a/samples/MvcSample/SimplePocoController.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace MvcSample -{ - public class SimplePocoController - { - public string Index() - { - return "Hello world"; - } - } -} diff --git a/samples/MvcSample/SimpleRest.cs b/samples/MvcSample/SimpleRest.cs deleted file mode 100644 index c60502144b..0000000000 --- a/samples/MvcSample/SimpleRest.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Microsoft.AspNet.Mvc; - -namespace MvcSample -{ - public class SimpleRest : Controller - { - public string Get() - { - return "Get method"; - } - } -} diff --git a/samples/MvcSample/Startup.cs b/samples/MvcSample/Startup.cs deleted file mode 100644 index 909ef0cefe..0000000000 --- a/samples/MvcSample/Startup.cs +++ /dev/null @@ -1,67 +0,0 @@ - -#if NET45 -using Autofac; -using System; -using Microsoft.AspNet.Abstractions; -using Microsoft.AspNet.DependencyInjection; -using Microsoft.AspNet.DependencyInjection.Autofac; -using Microsoft.AspNet.DependencyInjection.NestedProviders; -using Microsoft.AspNet.Mvc; -using Microsoft.AspNet.Routing; -using Owin; - -namespace MvcSample -{ - public class Startup - { - private IServiceProvider _serviceProvider; - - public Startup(IServiceProvider serviceProvider) - { - _serviceProvider = serviceProvider; - } - - public void Configuration(IAppBuilder app) - { - app.UseErrorPage(); - - // Temporary bridge from katana to Owin - app.UseBuilder(ConfigureMvc); - } - - private void ConfigureMvc(IBuilder builder) - { - var containerBuilder = new ContainerBuilder(); - var services = MvcServices.GetDefaultServices(); - - AutofacRegistration.Populate(containerBuilder, _serviceProvider, services); - containerBuilder.RegisterInstance(new PassThroughAttribute()); - - // This is only needed in the selfhost sample - there's no need to port this to the web sample, since - // it's provided by default there. - containerBuilder.RegisterType().As(); - - // Temporary until we have support for open generics in our DI system. - containerBuilder.RegisterGeneric(typeof(NestedProviderManager<>)).As(typeof(INestedProviderManager<>)); - containerBuilder.RegisterGeneric(typeof(NestedProviderManagerAsync<>)).As(typeof(INestedProviderManagerAsync<>)); - - var serviceProvider = containerBuilder.Build().Resolve(); - - var routes = new RouteCollection() - { - DefaultHandler = new MvcApplication(serviceProvider), - }; - - routes.MapRoute( - "{controller}/{action}", - new { controller = "Home", action = "Index" }); - - routes.MapRoute( - "{controller}", - new { controller = "Home" }); - - builder.UseRouter(routes); - } - } -} -#endif diff --git a/samples/MvcSample/ViewMetadata.cs b/samples/MvcSample/ViewMetadata.cs deleted file mode 100644 index dc11624a2b..0000000000 --- a/samples/MvcSample/ViewMetadata.cs +++ /dev/null @@ -1,25 +0,0 @@ -#if VIEWMETADATA -using System; -using System.Collections.Generic; - -public class ViewMetadata -{ - public static Dictionary Metadata - { - get - { - return new Dictionary - { - { - "~/Views/Home/MyView.cshtml", - typeof(MvcSample.Views.MyView) - }, - { - "~/Views/Shared/_Layout.cshtml", - typeof(MvcSample.Views.Layout) - } - }; - } - } -} -#endif \ No newline at end of file diff --git a/samples/MvcSample/Views/Link/Details.cshtml b/samples/MvcSample/Views/Link/Details.cshtml deleted file mode 100644 index f627dfdcba..0000000000 --- a/samples/MvcSample/Views/Link/Details.cshtml +++ /dev/null @@ -1,3 +0,0 @@ - - -@Url.Action("About") diff --git a/samples/MvcSample/Views/Shared/MyView.cshtml b/samples/MvcSample/Views/Shared/MyView.cshtml deleted file mode 100644 index 1b4d654c4c..0000000000 --- a/samples/MvcSample/Views/Shared/MyView.cshtml +++ /dev/null @@ -1,36 +0,0 @@ -@using MvcSample.Models -@model User -@{ - Layout = "/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "Home Page"; - string nullValue = null; -} - -
-

ASP.NET

-

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

-

Learn more »

-
-
-

Hello @Model.Name! Happy @Model.Age birthday.

- -
-

Getting started

-

- ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that - enables a clean separation of concerns and gives you full control over markup - for enjoyable, agile development. -

-

Learn more »

-
-
-

Get more libraries

-

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

-

Learn more »

-
-
-

Web Hosting

-

You can easily find a web hosting company that offers the right mix of features and price for your applications.

-

Learn more »

-
-
diff --git a/samples/MvcSample/Views/Shared/_Layout.cshtml b/samples/MvcSample/Views/Shared/_Layout.cshtml deleted file mode 100644 index 1f7c228ce3..0000000000 --- a/samples/MvcSample/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - @ViewBag.Title - My ASP.NET Application - - - - -
- @RenderBody() -
-
- @Model.Address -
-
-

© @DateTime.Now.Year - My ASP.NET Application

-
-
- - diff --git a/samples/MvcSample/Web.Debug.config b/samples/MvcSample/Web.Debug.config deleted file mode 100644 index 2e302f9f95..0000000000 --- a/samples/MvcSample/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/MvcSample/Web.Release.config b/samples/MvcSample/Web.Release.config deleted file mode 100644 index c35844462b..0000000000 --- a/samples/MvcSample/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/samples/MvcSample/Web.config b/samples/MvcSample/Web.config deleted file mode 100644 index 787aa09c3f..0000000000 --- a/samples/MvcSample/Web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/samples/MvcSample/project.json b/samples/MvcSample/project.json deleted file mode 100644 index 61fdb5ab57..0000000000 --- a/samples/MvcSample/project.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "version": "0.1-alpha-*", - "dependencies": { - "Microsoft.AspNet.Abstractions": "0.1-alpha-*", - "Microsoft.AspNet.ConfigurationModel": "0.1-alpha-*", - "Microsoft.AspNet.DependencyInjection": "0.1-alpha-*", - "Microsoft.AspNet.Routing": "0.1-alpha-*", - "Microsoft.AspNet.Mvc.ModelBinding": "", - "Microsoft.AspNet.Mvc.Core": "", - "Microsoft.AspNet.Mvc": "", - "Microsoft.AspNet.Mvc.Razor": "", - "Microsoft.AspNet.Mvc.Rendering": "" - }, - "configurations": { - "net45": { - "dependencies": { - "Autofac": "3.3.0", - "Owin": "1.0", - "Microsoft.AspNet.DependencyInjection.Autofac": "0.1-alpha-*", - "Microsoft.Owin": "2.1.0", - "Microsoft.Owin.Diagnostics": "2.1.0", - "Microsoft.Owin.Hosting": "2.1.0", - "Microsoft.Owin.Host.HttpListener": "2.1.0", - "Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*", - "System.ComponentModel.DataAnnotations": "" - } - }, - "k10": { - "dependencies": { - "System.ComponentModel": "4.0.0.0", - "System.Console": "4.0.0.0", - "System.Diagnostics.Debug": "4.0.10.0", - "System.Diagnostics.Tools": "4.0.0.0", - "System.Dynamic.Runtime": "4.0.0.0", - "System.Runtime": "4.0.20.0", - "System.Runtime.InteropServices": "4.0.10.0", - "System.Threading.Tasks": "4.0.0.0", - "Microsoft.ComponentModel.DataAnnotations": "0.1-alpha-*" - } - } - } -} \ No newline at end of file diff --git a/samples/MvcSample/web.config b/samples/MvcSample/web.config deleted file mode 100644 index 787aa09c3f..0000000000 --- a/samples/MvcSample/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -