namespace AutoUpdater { public abstract class Routing : IRouting { /// /// pick a instance to receive the message /// /// The message that is being routed /// A collection of instance /// public virtual T select(object message, params T[] instances) { if (instances == null || instances.Length == 0) return default(T); if (instances.Length == 1) return instances[0]; return selectInternal(message, instances); } /// /// internal select method /// /// The message that is being routed /// A collection of instance /// protected abstract T selectInternal(object message, T[] instances); } }