Skip to content

Commit

Permalink
fix some code for sizing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfuller committed Mar 20, 2010
1 parent 65c84a5 commit cc56f63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dependencies/src/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public static void Main()
cfg.For<IMovieFinder>().Use<ImbdMovieFinder>();
});

var lister = new MovieLister(ObjectFactory.GetInstance<IMovieFinder>());
var lister = new MovieLister(
ObjectFactory.GetInstance<IMovieFinder>());

lister.MoviesDirectedBy("Kubrick").Each(
movie => Console.WriteLine(movie.ToString()));
Expand Down
3 changes: 2 additions & 1 deletion dependencies/src/Intercept.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public static void Main()
.Use<DatabaseMovieFinder>()
.InterceptWith(new LoggingInterceptor());
cfg.For<IDbConnection>().Singleton().Use<SqlConnection>()
cfg.For<IDbConnection>()
.Singleton().Use<SqlConnection>()
.Ctor<string>().Is("connection_string");
});

Expand Down
3 changes: 2 additions & 1 deletion dependencies/src/Singleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ public static void Main()
ObjectFactory.Configure(cfg =>
{
cfg.For<IMovieFinder>().Use<DatabaseMovieFinder>();
cfg.For<IDbConnection>().Singleton().Use<SqlConnection>()
cfg.For<IDbConnection>()
.Singleton().Use<SqlConnection>()
.Ctor<string>().Is("connection_string");
});

Expand Down

0 comments on commit cc56f63

Please sign in to comment.