public IEnumerable <IParcelVisionEvent> UpconvertEvent(IParcelVisionEvent originalEvent)
        {
            ConvertFunction converterFunction;

            if (converters.TryGetValue(originalEvent.GetType(), out converterFunction))
            {
                foreach (var convertedEvent in converterFunction(originalEvent))
                {
                    yield return(convertedEvent);
                }
            }
            else
            {
                yield return(originalEvent);
            }
        }
Exemplo n.º 2
0
 bool IEventConverter.CanConvert(IParcelVisionEvent @event)
 {
     return(@event.GetType().IsAssignableFrom(SourceType));
 }