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 DependencyWrapper : Wrapper | |
{ | |
private readonly object dependency; | |
public DependencyWrapper(Type behaviorType, object dependency) : base(behaviorType) | |
{ | |
this.dependency = dependency; | |
} | |
protected override FubuMVC.Core.Registration.ObjectGraph.ObjectDef buildObjectDef() |
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
MongoConfiguration.Initialize(c => c.AddMap<PersonMap>()); | |
using (var db = Mongo.Create("mongodb://localhost/test")) | |
{ | |
var people = db.GetCollection<Person>(); | |
people.Save(new Person { FirstName = "myfirst", LastName = "mylast" }); | |
var person = (from p in people.AsQueryable() | |
where p.FirstName == "myfirst" | |
select p).Single(); | |
Console.WriteLine(person.FirstName + " " + person.LastName); | |
} |
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
var order = db.GetCollection<Order>().Find(new { }) | |
.Include(o => o.ProductsOrdered) | |
.First(); |
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
<link href="~/Content/Site.css" type="text/css" rel="stylesheet" /> | |
<script src="~/Scripts/jquery-1.4.1.js" type="text/javascript" language="javascript" /> |
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 ModelUrlResolutionCache : IModelUrlResolver | |
{ | |
static Cache<string, string> _inputModelTypeCache; | |
public ModelUrlResolutionCache(IUrlRegistry urlRegistry, BehaviorGraph graph) | |
{ | |
if (_inputModelTypeCache == null) | |
_inputModelTypeCache = new Cache<string, string>(inputModel => | |
{ | |
var inputType = Type.GetType(inputModel) |
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 FubuCore; | |
using FubuCore.Util; | |
using FubuMVC.Core.View.Model; | |
using FubuMVC.Razor.RazorModel; | |
using FubuMVC.Razor.Rendering; | |
using RazorEngine.Templating; | |
using RazorEngine.Text; | |
using ITemplate = RazorEngine.Templating.ITemplate; |
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
<rhino.esb> | |
<assemblies> | |
<add assembly="Rhino.ServiceBus.RhinoQueues" /> | |
</assemblies> | |
<bus threadCount="1" | |
numberOfRetries="5" | |
endpoint="rhino.queues://localhost/test_queue" | |
queueIsolationLevel="ReadCommitted" | |
/> | |
<messages> |
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 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; |
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 AcceptPrivacyStatementPolicy : IConfigurationAction | |
{ | |
public void Configure(BehaviorGraph graph) | |
{ | |
graph.Actions() | |
.Where(x => x.RequiresAuthentication()) | |
.Each(x => x.WrapWith<AccceptPrivacyPolicyRedirector>()); | |
} | |
} |
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 AcceptPrivacyPolicyRedirector | |
{ | |
private readonly ISession _session; | |
public AcceptPrivacyPolicyRedirector(ISession session) | |
{ | |
_session = session; | |
} | |
public FubuContinuation Execute(UserRequestInputModel input) |
OlderNewer