Skip to content

Instantly share code, notes, and snippets.

View gist:4243501
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.5">
View Application.cshtml
<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
<header><h1>Hello from Layout</h1></header>
<div>
@RenderBody()
@CoreyKaylor
CoreyKaylor / web.config
Created Nov 19, 2012
Getting Started with FubuMVC Again
View web.config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
@CoreyKaylor
CoreyKaylor / HelloFubuRegistry.cs
Created Nov 18, 2012
Getting Started with FubuMVC Again
View HelloFubuRegistry.cs
using System;
using FubuMVC.Core;
using HelloWorld.Features.Home;
namespace HelloWorld
{
public class HelloWorldRegistry : FubuRegistry
{
public HelloWorldRegistry()
{
@CoreyKaylor
CoreyKaylor / Home.spark
Created Nov 18, 2012
Getting Started with FubuMVC Again
View Home.spark
<viewdata model="HelloWorld.Features.Home.HomeViewModel" />
<h1>Hello ${Model.Message}</h1>
@CoreyKaylor
CoreyKaylor / Global.asax.cs
Created Nov 18, 2012
Getting Started with FubuMVC Again
View Global.asax.cs
using System;
using FubuMVC.Core;
using FubuMVC.StructureMap;
using StructureMap;
namespace HelloWorld
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
View AcceptPrivacyPolicyRedirectorSampleV2.cs
public class AcceptPrivacyPolicyRedirector
{
private readonly ISession _session;
public AcceptPrivacyPolicyRedirector(ISession session)
{
_session = session;
}
public FubuContinuation Execute(UserRequestInputModel input)
View AcceptPrivacyStatementPolicy.cs
public class AcceptPrivacyStatementPolicy : IConfigurationAction
{
public void Configure(BehaviorGraph graph)
{
graph.Actions()
.Where(x => x.RequiresAuthentication())
.Each(x => x.WrapWith<AccceptPrivacyPolicyRedirector>());
}
}
View AcceptPrivacyPolicyRedirectorSampleV1.cs
public class AcceptPrivacyPolicyRedirector : IActionBehavior
{
private readonly ISession _session;
private readonly IFubuRequest _fubuRequest;
private readonly IContinuationDirector _continuationDirector;
private readonly IActionBehavior _inner;
public AcceptPrivacyPolicyRedirector(ISession session, IFubuRequest fubuRequest, IContinuationDirector continuationDirector, IActionBehavior inner)
{
_session = session;
@CoreyKaylor
CoreyKaylor / App.config
Created Oct 15, 2012
RSB 3.0.0 Configuration
View App.config
<rhino.esb>
<assemblies>
<add assembly="Rhino.ServiceBus.RhinoQueues" />
</assemblies>
<bus threadCount="1"
numberOfRetries="5"
endpoint="rhino.queues://localhost/test_queue"
queueIsolationLevel="ReadCommitted"
/>
<messages>