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
Jeremy, this is for your benefit. I wanted to follow Josh's advice with that patch that Peter just sent in. | |
Here was my workflow: | |
- git pull (make sure I'm up to date) | |
- git apply patch.txt | |
- del patch.txt | |
- rake | |
- git commit -a -m "blah blah" | |
- git pull |
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 DiffTrees | |
{ | |
private IList<Tree> trees = new List<Tree>(); | |
public bool Recursive { get; set; } | |
public void AddTree(Tree tree) | |
{ | |
trees.Add(tree); | |
} |
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 DiffTreePort | |
{ | |
private bool recursive; | |
public void AddTree(AbstractTreeIterator c) | |
{ | |
trees.Add(c); | |
} | |
private List<AbstractTreeIterator> trees = new List<AbstractTreeIterator>(); |
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
// special interface for overriding automaps | |
public interface IMappingOverride<T> | |
{ | |
void Override(AutoMap<T> mapping); | |
} | |
// special config chunk for using above | |
public class SupplyMappingOverridesChunk : IAutoMappingConfigChunk | |
{ | |
private readonly Assembly assembly; |
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 interface IAutoMappingConfigChunk | |
{ | |
void Configure(AutoPersistenceModel model); | |
} | |
// in AutoPersistenceModel | |
public AutoPersistenceModel WithConfigurationChunk(IAutoMappingConfigChunk chunk) | |
{ | |
configChunks.Add(chunk); | |
return this; |
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.Reflection; | |
using FluentNHibernate.AutoMap; | |
using FluentNHibernate.Framework; | |
using MyApplication.Core.Domain; | |
namespace MyApplication.Core.Persistence | |
{ | |
public class MyCustomPersistenceModel : AutoPersistenceModel | |
{ | |
public MyCustomPersistenceModel() |
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
Task<AddCosts>(task => | |
task.Result<Done>() | |
.WhenSetting(Settings.HasMasterApproval) | |
.IsTrueGoto(MasterApprovalSequence) | |
.IsFalseGoto(NonMasterApprovalSequence)); |
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
Filename = LetterOrDigit+:name '.' LetterOrDigit+:ext -> { name.As<string>() + "." + ext.As<string>() } | |
| LetterOrDigit+:name -> { name.As<string>() }, |
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
FullFile = FileStats+:files -> { files }, |
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
protected IList<T> ParseList<T>(string text, Func<GitNumstatParser, Rule<char>> ruleFetcher) | |
{ | |
return new List<T>(Grammars.ParseWith(text, ruleFetcher).ToIEnumerable<T>()); | |
} |