public MergeIterator(IAttributeNames[] inputs, KeyDispatch default_dispatcher) { foreach (var input in inputs) { foreach (var key in input.GetAttributeNames()) { dispatchers[key] = default_dispatcher; } } Position = 0; }
/** * Add dispatcher for a particular key name. * * When the key is encoutered, this dispatcher will be invoked, instead of * the default dispatcher in the constructor. Added dispatchers are always * invoked, even if they do not occur in the input key space. */ public void AddDispatcher(string name, KeyDispatch dispatcher) { dispatchers[name] = dispatcher; }