public T GetOrderAction <T>() where T : OrderAction { OrderAction orderAction; if (OrderActions.TryGetValue(typeof(T).Name, out orderAction)) { return((T)orderAction); } else { return(null); } }