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
| //annotate your view model property with this attribute | |
| [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] | |
| public class GbstListValueAttribute : Attribute | |
| { | |
| private readonly string _listName; | |
| public GbstListValueAttribute(string listName) | |
| { | |
| _listName = listName; |
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
| <viewdata model="FubuMVC.HelloSpark.Controllers.Air.BreatheViewModel" /> | |
| <h2>${Model.Text}</h2> | |
| <p> | |
| This paragraphy should be before the go request partial | |
| </p> | |
| #this.Partial<FubuMVC.HelloSpark.Controllers.HtmlTager.GoRequest>(); |
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 FakeWriter : TextWriter | |
| { | |
| public object Written { get; set; } | |
| public override void Write(object value) | |
| { | |
| Written = value; | |
| } | |
| public override Encoding Encoding |
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
| //My advice (YMMV) : | |
| // | |
| //skip the view filter | |
| //Only expose your normal U type actions to the action scanner (source) | |
| //add a covention that prepends your U type actions with the appropriate automapperaction<T,U> | |
| // * your devices to know what T goes with what U | |
| public class AutoMapperConvention : IConfigurationAction |
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
| [TestFixture] | |
| public abstract class Context<T> where T : class | |
| { | |
| public RhinoAutoMocker<T> _services { get; private set; } | |
| public T _cut { get; private set; } | |
| [SetUp] | |
| public void Setup() | |
| { |
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 interface IRegularExpressionEvaluator | |
| { | |
| IMatch Match(Regex expression, string stringToMatch); | |
| } | |
| public class RegularExpressionSettings : DictionaryConvertible | |
| { | |
| public readonly int DefaultTimeoutInSeconds = 30; | |
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 static class ClarifyGenericExtensions | |
| { | |
| public static ClarifyGeneric Filter(this ClarifyGeneric generic, Func<FilterExpression, Filter> filterFunction) | |
| { | |
| var filterExpression = new FilterExpression(); | |
| var filter = filterFunction(filterExpression); | |
| generic.Filter.AddFilter(filter); |
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
| [alias] | |
| st = status | |
| c = commit -m | |
| aa = add -A | |
| fa = fetch --all | |
| co = checkout | |
| pu = clean -dfx | |
| cu = !git fetch --all && git pull --rebase origin && git submodule update | |
| new = checkout -b | |
| done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && rake && git push |
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 static class NameValueCollectionExtensions | |
| { | |
| public static string PrettyPrint(this NameValueCollection collection) | |
| { | |
| var keys = collection.AllKeys.Select(k => "{0} : {1}".ToFormat(k, collection[k])); | |
| return String.Join(Environment.NewLine, keys); | |
| } | |
| } |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <solution> | |
| <add key="disableSourceControlIntegration" value="true" /> | |
| </solution> | |
| <packageSources> | |
| <add key="myrepo" value="\\server\\share\\path" /> | |
| </packageSources> | |
| </configuration> |