Skip to content

Commit

Permalink
Added my Razor stuffs
Browse files Browse the repository at this point in the history
The old RazorViewEngine project could probably be removed.. the new Html
is for handling Html formatting in the WebApi, it supports different
types of parsers (as long as they are implemented of course). The .Razor
project is for parsing Razor to Html.. I also added a ASP.Net Web Api
project for showing how to use Razor stuffs.. it should of course be
removed later.. in the final release.
  • Loading branch information
fredrikn committed Aug 19, 2012
1 parent 7a5f143 commit 8ec259c
Show file tree
Hide file tree
Showing 123 changed files with 34,627 additions and 2 deletions.
43 changes: 43 additions & 0 deletions MvcApplication1/App_Start/BundleConfig.cs
@@ -0,0 +1,43 @@
using System.Web;
using System.Web.Optimization;

namespace MvcApplication1
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));

bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));

// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
}
}
}
13 changes: 13 additions & 0 deletions MvcApplication1/App_Start/FilterConfig.cs
@@ -0,0 +1,13 @@
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
23 changes: 23 additions & 0 deletions MvcApplication1/App_Start/RouteConfig.cs
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace MvcApplication1
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
14 changes: 14 additions & 0 deletions MvcApplication1/App_Start/ViewConfig.cs
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using MvcApplication1.Controllers;

namespace MvcApplication1
{
public class ViewConfig
{
public static void RegisterViews(IDictionary<Type, string> views)
{
//views.Add(typeof(Customer), "CustomerViaConfig");
}
}
}
19 changes: 19 additions & 0 deletions MvcApplication1/App_Start/WebApiConfig.cs
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;

namespace MvcApplication1
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}

0 comments on commit 8ec259c

Please sign in to comment.