This file contains hidden or 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
| try{ | |
| DoSomething(); | |
| } | |
| catch | |
| { | |
| } |
This file contains hidden or 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 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 |
This file contains hidden or 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 HelloSparkRegistry : FubuRegistry | |
| { | |
| public HelloSparkRegistry() | |
| { | |
| IncludeDiagnostics(true); | |
| Applies | |
| .ToThisAssembly(); | |
| Actions |
This file contains hidden or 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 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(); | |
| } |
This file contains hidden or 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
| javascript:$("#capitalSidebar").remove(); $("#application").css("margin-right","0px"); $(window).triggerHandler("resize");return; |
This file contains hidden or 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
| return List.Where(x=>something.IsTrue(x)).Select(x=>something.CreateFoo(x)); |
This file contains hidden or 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 AssetsWarmUpPolicy : IAssetPolicy | |
| { | |
| private readonly IAssetRequirements _requirements; | |
| private readonly IAssetTagPlanCache _planCache; | |
| public AssetsWarmUpPolicy(IAssetRequirements requirements, IAssetTagPlanCache planCache) | |
| { | |
| _requirements = requirements; | |
| _planCache = planCache; | |
| } |
This file contains hidden or 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 MyOwnPolicy : IAssetPolicy | |
| { | |
| private readonly IAssetTagPlanCache _planCache; | |
| private readonly IAssetDependencyFinder _finder; | |
| public MyOwnPolicy(IAssetTagPlanCache planCache, IAssetDependencyFinder finder) | |
| { | |
| _planCache = planCache; | |
| _finder = finder; | |
| } |
This file contains hidden or 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.Collections.Generic; | |
| using Bottles; | |
| using Bottles.Diagnostics; | |
| using FubuCore; | |
| using Spark; | |
| namespace WebApplication7 | |
| { | |
| public class SparkSettingsActivator : IActivator | |
| { |
This file contains hidden or 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 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); | |
| }); |