Skip to content

Commit

Permalink
Added bot initializer strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
sethwebster committed Dec 26, 2011
1 parent 50d74a8 commit 3d3fc04
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1,000 deletions.
5 changes: 3 additions & 2 deletions Jabbot/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ private void OnLogOn(IEnumerable<string> rooms)
private void InitializeContainer()
{
var container = CreateCompositionContainer();

// Add all the sprockets to the sprocket list
foreach (var sprocket in container.GetExportedValues<ISprocket>())
{
Trace.WriteLine(String.Format("Adding {0}...", sprocket.GetType().Name));
AddSprocket(sprocket);
}
}
Expand All @@ -378,14 +378,15 @@ private CompositionContainer CreateCompositionContainer()
if (_container == null)
{
{
Trace.WriteLine(String.Format("Unable to Initialize {0}:{1}", sprocketInitializer.GetType().Name, ex.GetBaseException().Message));
Console.WriteLine("Unable to Initialize {0}:{1}", sprocketInitializer.GetType().Name, ex.GetBaseException().Message);
}
}
}

private CompositionContainer CreateCompositionContainer()
{
if (_container == null)
{
{
string extensionsPath = GetExtensionsPath();

Expand Down
Loading

0 comments on commit 3d3fc04

Please sign in to comment.