Skip to content

Commit

Permalink
Try add a nicer interface for the interceptor.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 10, 2012
1 parent fefaf03 commit 278450e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/CommandBasedComponents.csproj
Expand Up @@ -43,6 +43,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Core\AfterCommand.cs" />
<Compile Include="Testing\FakeWindowsServiceFacade.cs" />
<Compile Include="Infrastructure\IWindowsServiceFacade.cs" />
<Compile Include="Scratchpad.cs" />
Expand Down
13 changes: 13 additions & 0 deletions Source/Core/AfterCommand.cs
@@ -0,0 +1,13 @@
using System.Diagnostics;

namespace CommandBasedComponents.Core
{
[DebuggerNonUserCode]
public static class AfterCommand<TCommandType>
{
public static void Run(ICommand command)
{
Interceptor.RunAfter<TCommandType>(command);
}
}
}
2 changes: 1 addition & 1 deletion Source/Scratchpad.cs
Expand Up @@ -440,7 +440,7 @@ public class Runner
public void Run()
{
// an plugin would run this
Interceptor.RunAfter<InitializeRequiredPackageIds>(new AddRequiredPackageIds
AfterCommand<InitializeRequiredPackageIds>.Run(new AddRequiredPackageIds
{
PackageIds = new[]
{
Expand Down

0 comments on commit 278450e

Please sign in to comment.