Month: June 2009

SharePoint SilverView

No Picture

I’ve just seen this up and running – really slick webpart. http://code.msdn.microsoft.com/ssv/

Read More »

C#: Generics Equality

No Picture

When comparing objects using generics in C#, the behaviour is slightly different to normal comparison behaviour – notably that the compiler will default to using the more generic equals method equals(object obj)) as opposed to specific type based…

Read More »

Linq to SQL: MSLinqToSQLGenerator Failed

No Picture

Just a quick note in case i run into this again. To remedy this, you need to move the using statements into the namespace in the partial class. http://social.msdn.microsoft.com/forums/en-US/linqtosql/thread/6c8d829f-036d-4b0a-a27d-b216482ea047/

Read More »

Patterns Examples

No Picture

I have recently been brushing up on patterns and have created a solution containing a load of pattern examples (as a learning exercise). I thought I may as well share this and hence have published it on codeplex. …

Read More »

WCF: Consuming Xml Rest Service

No Picture

Below is an example of how to consume a restful service that returns xml date from wcf client. This example is based on a discography service that returns releases for a specific artist. The name of the artist…

Read More »

Some More RhinoMocks Examples

No Picture

Here is a little bit of example code testing readonly / writeonly properties on a interface, as well as void methods var mockRepository = new MockRepository(); var foo = mockRepository.StrictMock<IFoo>(); using (mockRepository.Record()) {   // Test property is…

Read More »

Unit Tests: Mocking a base class method

No Picture

This example talks about testing a method in a subclass that calls a base class method. Calling the base class method has side effects (e.g relies on a database / httpcontext, or in this example calls console.writeline), so…

Read More »