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.Web.Mvc; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
/// <summary> | |
/// MSTest Asserts for unit testing MVC3 Controllers. | |
/// </summary> | |
public static class AssertMvc | |
{ | |
public static T ResultIs<T>(object result) | |
where T : ActionResult |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace Rally25rs.Gist.Data | |
{ |
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; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
namespace Web.Extensions | |
{ | |
public static class HtmlHelperDisplayNameExtensions | |
{ | |
/// <summary> |
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
/* *** | |
* This sample is again from an ORM tool that I had been working on. | |
* | |
* This is simply an example of a "factory" pattern that I wrote a few years ago. | |
* This factory is designed to return the same IDataBinder instance when the same | |
* database connection string is passed in. | |
* *** */ | |
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
/* *** | |
* This is a method from an object-relation-mapping (ORM) tool that I had started to write. | |
* I eventually stopped working on it, ad instead contributed time to the open source | |
* SubSonic project instead. | |
* | |
* This method is an example of generating DynamicMethods to be used at runtime to check and | |
* set some properties any an arbitrary type. This was used over straight reflection every time | |
* because reflection can be fairly slow. The use of a DynamicMethod is much quicker. | |
* *** */ |
NewerOlder