CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Extension methods
C#
namespace NUnit.Framework
{
    public static class AssertionHelpers
    {
        public static void WithMessage(this Exception ex,string expectedMessage)
        {
            Assert.AreEqual(ex.Message, expectedMessage);           
        }
    }
}
by DrRandom   December 29, 2009 @ 12:09pm
446 Views
no comments
 
C#
// Extension method for retrieving a page from a PageReference
// For example:
// PageData parent = CurrentPage.ParentLink.GetPage()
public static PageData GetPage(this PageReference link)
{
    if (link==PageReference.EmptyReference)
        return null;
 
    return DataFactory.Instance.GetPage(link);
}
by Ted Nyberg   December 08, 2009 @ 8:02am
219 Views
1 comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate