Beispiel #1
0
        public static TOut Dispatch <TOut>(Type type, ITypeDispatcher <TOut> dispatcher)
        {
            var dispatcherType = typeof(Dispatcher <>).MakeGenericType(type);
            var dsp            = (ITypeDispatcher)Activator.CreateInstance(dispatcherType) !;

            return(dsp.Dispatch(dispatcher));
        }
Beispiel #2
0
 public T Dispatch <T>(ITypeDispatcher <T> dispatcher)
 {
     return(dispatcher.Dispatch <TValue>());
 }