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