Friday, 6 May 2011

ASP.Net Social Networking - Fisharoo: Interfaces

Have been plugging away using Andrew Siemer's book for some time now.

Its now time to start blogging about some of the challenges and learnings.

The first thing is, Andrew doesn't go into any detail regarding the definition of the Interfaces defining the behaviour driving the StrucutreMap Factory Dependancy Injection pattern.

So at this point, I have created a new namespace:


And for each class that uses StructureMap, ie, has a [Pluggable] attribute, i define an interface as such:

namespace FisharooCore.Interfaces
    public interface IConfiguration

Thing is, he often refers to the use of a ConfigurationManager class.

Where is this defined? System.Configuration???

Not in the .Net version i have (3.5) thats what i thought!

I searched all the documentation and everything pointed to the fact that the class should be available as long as the System.Configuration namespace was being referenced.

AMATEUR MISTAKE: You also have to explicitly Add Reference to the System.Configuration DLL to your project.

I guess i just assumed that it would have been referenced by default...but its not.

1 comment:

  1. Yep, its System.Configuration!

    Dunnoe about its in dn3.5 or not,

    but you can try adding the reference
    library from .Net Components.!!