Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Try add a nicer interface for the interceptor.

  • Loading branch information...
commit 278450ebc996dea86b940d531263583db20e0640 1 parent fefaf03
Steve Wagner authored
1  Source/CommandBasedComponents.csproj
View
@@ -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" />
13 Source/Core/AfterCommand.cs
View
@@ -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  Source/Scratchpad.cs
View
@@ -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[]
{
Please sign in to comment.
Something went wrong with that request. Please try again.