diff options
Diffstat (limited to 'slips/src/app/Marina/Web/Handlers/RequestHandler.cs')
| -rw-r--r-- | slips/src/app/Marina/Web/Handlers/RequestHandler.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/slips/src/app/Marina/Web/Handlers/RequestHandler.cs b/slips/src/app/Marina/Web/Handlers/RequestHandler.cs new file mode 100644 index 0000000..a2162ef --- /dev/null +++ b/slips/src/app/Marina/Web/Handlers/RequestHandler.cs @@ -0,0 +1,26 @@ +using Marina.Infrastructure;
+using Marina.Web.Http;
+
+namespace Marina.Web.Handlers {
+ public class RequestHandler : IRequestHandler {
+ public RequestHandler( ISpecification< IHttpGateway > specification, ICommand command ) {
+ _specification = specification;
+ _command = command;
+ }
+
+ public bool IsSatisfiedBy( IHttpGateway item ) {
+ return _specification.IsSatisfiedBy( item );
+ }
+
+ public void Execute() {
+ _command.Execute( );
+ }
+
+ public static ISpecification< IHttpGateway > For( string commandName ) {
+ return new RequestHandlerSpecification( commandName );
+ }
+
+ private readonly ISpecification< IHttpGateway > _specification;
+ private readonly ICommand _command;
+ }
+}
\ No newline at end of file |
