Created
February 8, 2013 02:47
-
-
Save crmckenzie/4736237 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ICommand<in TRequest, out TResponse> : IDisposable | |
{ | |
TResponse Execute(TRequest request); | |
} | |
/// <summary> | |
/// Use Request.Empty when the command doesn't need any arguments. | |
/// </summary> | |
public class Request | |
{ | |
public static readonly Request Empty = new Request(); | |
private Request() | |
{ | |
} | |
} | |
/// <summary> | |
/// Use Response.Empty when the command doesn't return any meaningful results. | |
/// </summary> | |
public class Response | |
{ | |
public static readonly Response Empty = new Response(); | |
private Response() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment