This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class P3PHeaderAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuted(ActionExecutedContext filterContext) | |
{ | |
filterContext.HttpContext.Response.AppendHeader("P3P", "CP=\\\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\\\""); | |
} | |
} | |
//source: http://stackoverflow.com/questions/13975777/p3p-header-info-in-mvc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.sln.docstates | |
*.DotSettings | |
# Build results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Set default behavior to automatically normalize line endings. | |
############################################################################### | |
* text=auto | |
############################################################################### | |
# Set default behavior for command prompt diff. | |
# | |
# This is need for earlier builds of msysgit that does not have it on by | |
# default for csharp files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Init() { | |
// Inject properties into the handler before execution | |
PreRequestHandlerExecute += (sender, e) => | |
{ | |
var app = sender as HttpApplication; | |
if (app == null) return; | |
var handler = app.Context.CurrentHandler; | |
if (handler == null) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Init() { | |
// Inject properties into the handler before execution | |
PreRequestHandlerExecute += (sender, e) => | |
{ | |
var app = sender as HttpApplication; | |
if (app == null) return; | |
var handler = app.Context.CurrentHandler; | |
if (handler == null) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Spark.Web.Mvc; | |
namespace Dimecasts.Web | |
{ | |
using MvcTurbine.ComponentModel; | |
using MvcTurbine.Web; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CommonServiceRegistration : IServiceRegistration | |
{ | |
public void Register(IServiceLocator locator) | |
{ | |
// use the GetUnderlyingContainer to get the 'internal' container the | |
// application is using | |
var container = locator.GetUnderlyingContainer<IWindsorContainer>(); | |
// now you can leverage your container to it's needs | |
// yes, I know it smells of hack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Provides the auto-registration of MVC related components (controllers, view engines, filters, etc). | |
/// </summary> | |
/// <param name="registrationList"></param> | |
public virtual void AddRegistrations(AutoRegistrationList registrationList) { | |
registrationList | |
.Add(MvcRegistration.RegisterController()) | |
.Add(MvcRegistration.RegisterViewEngine()) | |
.Add(MvcRegistration.RegisterFilter<IActionFilter>()) | |
.Add(MvcRegistration.RegisterFilter<IResultFilter>()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FubuMvc.Blades.UI { | |
using FubuMVC.UI; | |
using FubuMVC.UI.Configuration; | |
using FubuMVC.UI.Tags; | |
using MvcTurbine.ComponentModel; | |
public class SupportingServiceRegistration : IServiceRegistration { | |
public void Register(IServiceLocator locator) { | |
// Register the common Fubu UI pieces | |
locator.Register<IElementNamingConvention, DefaultElementNamingConvention>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace HtmlConventions { | |
using System; | |
using FubuMVC.UI; | |
using FubuMVC.UI.Configuration; | |
using FubuMVC.UI.Tags; | |
using HtmlTags; | |
public class CommonConventions : HtmlConventionRegistry { | |
public CommonConventions() { | |
Editors.Always.Attr("class", "test"); |