Skip to content

Instantly share code, notes, and snippets.

try{
DoSomething();
}
catch
{
}
using FubuMVC.Spark.Registration;
using FubuMVC.Spark.Registration.Nodes;
using FubuMVC.Spark.Rendering;
using FubuMVC.Spark.SparkModel;
using FubuTestingSupport;
using NUnit.Framework;
using Rhino.Mocks;
using Spark;
namespace FubuMVC.Spark.Tests.Rendering
public class HelloSparkRegistry : FubuRegistry
{
public HelloSparkRegistry()
{
IncludeDiagnostics(true);
Applies
.ToThisAssembly();
Actions
public class AssetFilesKey
{
private readonly List<string> _names;
private readonly List<string> _sortedNames;
public AssetFilesKey(IEnumerable<string> names)
{
_names = names.ToList();
_sortedNames = _names.OrderBy(x => x).ToList();
//_names.Sort();
}
javascript:$("#capitalSidebar").remove(); $("#application").css("margin-right","0px"); $(window).triggerHandler("resize");return;
@emiaj
emiaj / sample1.cs
Created January 9, 2012 19:06
Method groups
return List.Where(x=>something.IsTrue(x)).Select(x=>something.CreateFoo(x));
public class AssetsWarmUpPolicy : IAssetPolicy
{
private readonly IAssetRequirements _requirements;
private readonly IAssetTagPlanCache _planCache;
public AssetsWarmUpPolicy(IAssetRequirements requirements, IAssetTagPlanCache planCache)
{
_requirements = requirements;
_planCache = planCache;
}
public class MyOwnPolicy : IAssetPolicy
{
private readonly IAssetTagPlanCache _planCache;
private readonly IAssetDependencyFinder _finder;
public MyOwnPolicy(IAssetTagPlanCache planCache, IAssetDependencyFinder finder)
{
_planCache = planCache;
_finder = finder;
}
using System.Collections.Generic;
using Bottles;
using Bottles.Diagnostics;
using FubuCore;
using Spark;
namespace WebApplication7
{
public class SparkSettingsActivator : IActivator
{
var foo = new ObjectDef(typeof(Foo)); // you can also target a value instead of a type (new Foo())
foo.DependencyByType(typeof(IBar), typeof(Bar)); // by type
foo.DependencyByValue(typeof(IBaz), new Baz()); // by value
Services(x =>
{
x.AddService(typeof(IFoo), foo);
});