Skip to content

Commit

Permalink
added ability to output version info in banner
Browse files Browse the repository at this point in the history
  • Loading branch information
mookid8000 committed Mar 23, 2011
1 parent d2fe989 commit 1abada9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GoCommando/Go.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ static ICommando CreateInstance<TCommando>()
static void PossiblyShowBanner(object obj)
{
var type = obj.GetType();
type.WithAttributes<BannerAttribute>(ShowBanner);
type.WithAttributes<BannerAttribute>(a => ShowBanner(a, type.Assembly));
Write();
}

static void ShowBanner(BannerAttribute attribute)
static void ShowBanner(BannerAttribute attribute, Assembly assembly)
{
Write(attribute.Text);
Write(attribute.Text.Replace("{assemblyVersion}", assembly.GetName().Version.ToString()));
}

static void Write()
Expand Down

0 comments on commit 1abada9

Please sign in to comment.