I hereby claim:
- I am benfoster on github.
- I am benfoster (https://keybase.io/benfoster) on keybase.
- I have a public key ASAHVC9RNoa9g8n5MtUGFrXPGegaMX-gzzUSdmnbeKJSwgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public static void Execute(ChargeCommand command) | |
{ | |
var pipeline = new PipelineBuilder<ChargeContext>() | |
.Register(new TimingHandler()) | |
.Register(new LoggingHandler()) | |
.Register(new ValidationHandler( | |
validationPipeline => | |
{ | |
validationPipeline.Register(new AmountValidator(maxAmount: 500)); | |
} |
using Serilog; | |
using Serilog.Core; | |
using System; | |
using System.Web.Hosting; | |
namespace Merchant.Api.Logging | |
{ | |
/// <summary> | |
/// Detects application pool shutdowns and ensures all batched log entries | |
/// are flushed. |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace PipelineDemo | |
{ | |
// http://www.rantdriven.com/post/2009/09/16/Simple-Pipe-and-Filters-Implementation-in-C-with-Fluent-Interface-Behavior.aspx | |
public interface IFilter<TContext> | |
{ |
private void InitializeViewEngine() | |
{ | |
HostingEnvironment.RegisterVirtualPathProvider(new DynamicAssetVirtualPathProvider()); | |
ViewEngines.Engines.Clear(); | |
ViewEngines.Engines.Add(new ThemableViewEngine | |
{ | |
Theme = ctx => DependencyResolver.Current.GetService<ISiteContext>().Theme.ThemeName | |
}); |
<script> | |
$('.fab-portfolio-details .project-media li a') | |
.css('cursor', 'default') | |
.on('click', function() { | |
return false; | |
}); | |
var dtl = $('.fab-portfolio-details .project-media'); | |
if (dtl.length) { | |
$.magnificPopup.defaults.disableOn = function() { return false; } |
private void ConfigureCaching() | |
{ | |
var services = ConfigurationManager.ConnectionStrings[Constants.FabrikServicesConnectionStringKey]; | |
var cacheControlPolicy = new AttributeBasedCacheControlPolicy(new CacheControlHeaderValue | |
{ | |
Private = true, | |
MustRevalidate = true, | |
NoTransform = true, | |
MaxAge = TimeSpan.Zero |
var gulp = require('gulp'), | |
$ = require('gulp-load-plugins')({ | |
pattern: [ | |
'gulp-*', | |
'gulp.*', | |
'del', | |
'run-sequence', | |
'main-bower-files' | |
] | |
}); |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ReflectionDemo | |
{ | |
class Program |
public class root_mapper : base_context | |
{ | |
static object result; | |
Establish ctx = () | |
=> new RootMapper<PostsController>(x => x.Index()).RegisterRoutes(routes); | |
Because of = () | |
=> result = "~/".WithMethod(HttpVerbs.Get); |