CSharpFeeds - All your C# feeds in one place.

Sponsors

Feed: Scott DePouw's Blog

Site: http://scottdepouw.com/ Link: http://scottdepouw.com/feed/

Monday, May 31, 2010

Testing the IoC Container

by Scott DePouw via Scott DePouw's Blog on 5/31/2010 10:47:30 PM

Previously On My Blog In my previous post, I altered a simple ASP.NET Web Forms application so that instead of using Poor Man’s Dependency Injection and making constructor calls directly to concrete types to an application depending solely on interfaces by using an Inversion of Control (IoC) container. You can download the source for the application here. In this post I am going to add a couple of testing projects to the application: a unit test project and an integration test project. Using Io ...

[ read more ]

Saturday, April 24, 2010

Using Inversion of Control to Sever Dependencies

by Scott DePouw via Scott DePouw's Blog on 4/24/2010 2:14:35 PM

Introduction Inversion of Control is a great tool that can be used to help separate the various facets of a project. It can completely separate the knowledge of interfaces with knowledge of implementation, make the UI completely persistence-ignorant (to the point of not even referencing the Infrastructure portion of a project), and so on. In this post I will show you how to easily set up an Inversion of Control container so that you may also enjoy the pleasantries of keeping your project depend ...

[ read more ]

Wednesday, March 24, 2010

Let’s Unit Test Some LINQ to SQL

by Scott DePouw via Scott DePouw's Blog on 3/24/2010 10:56:21 AM

I have recently begun working on a project that utilizes LINQ to SQL as the layer of persistence. The project has a set of repositories that are used to access the data from LINQ to SQL, which then convert the objects generated by LINQ to SQL to domain objects. An initial implementation of a common repository method looks something like this: public class LegoRepository { private readonly IMapper<Lego, LinqToSqlObjects.Lego> _legoMapper;   // R ...

[ read more ]

Sunday, January 31, 2010

Telling Unity Which Constructor to Use when Initializing a Class

by Scott DePouw via Scott DePouw's Blog on 1/31/2010 3:12:00 PM

I’ve been using Unity for a fair amount of time now, and it has really grown on me. In my previous post, I linked to a solution which used it (although the rest of the project didn’t depend on that particular Inversion of Control container). For basic dependency injection, it has been working really well for me. However, I recently ran into an interesting issue. Say I have a class Foo (implementing IFoo) that I want resolved at runtime. Foo has the following constructors: public in ...

[ read more ]

Saturday, January 23, 2010

My Visual Studio Solution for Project Euler

by Scott DePouw via Scott DePouw's Blog on 1/23/2010 4:05:00 PM

I’ve recently been getting back into completing problems found at Project Euler. There are a lot of good problems on there that help me hone my programming skills (especially when it comes to test driven development). When starting into these problems again, I decided to create a solution where I could easily start up the TDD process without having to concern myself with other tasks that I found myself doing over and over again. I presently have this solution hosted in a Google Code reposi ...

[ read more ]

Saturday, January 16, 2010

Tagging Classes With Attributes

by Scott DePouw via Scott DePouw's Blog on 1/16/2010 6:20:00 PM

This past week, I wrote a custom C# Attribute for the first time. It was an attribute designed to be applied to classes to designate a particular, well, attribute of that class. It did not have any properties or methods in it: The attribute strictly served as what I’m interpreting as an attribute on a particular class. [AttributeUsage(AttributeTargets.Class)] public class McDonaldsAttribute : Attribute { } In this example, I’m going to apply [McDonalds] only to whatever food is ...

[ read more ]

Saturday, January 09, 2010

Composite Presentation Events and Silverlight

by Scott DePouw via Scott DePouw's Blog on 1/9/2010 2:43:00 PM

Recently, I have been working on my first Silverlight application. It has given me the opportunity to learn a lot about a technology that I have never used before. One of the many tools that I have learned to use over the past few weeks is Microsoft’s Composite Presentation Events. The application that I am working on relies heavily on these events. In this application, just about everything that occurs is asynchronous. Thus, the application is filled with subscriptions and publications of ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us