main
1using System;
2using Gorilla.Commons.Infrastructure.Logging;
3
4namespace presentation.windows.common
5{
6 public abstract class AbstractHandler<T> : Handler<T>, Handler
7 {
8 bool can_handle(Type type)
9 {
10 return typeof (T).Equals(type);
11 }
12
13 public void handle(object item)
14 {
15 if (can_handle(item.GetType()))
16 {
17 this.log().debug("handling... {0}", item);
18 handle((T) item);
19 }
20 }
21
22 public abstract void handle(T item);
23 }
24}