internal void SetProcessorOutputs(Processor processor, object[] output)
        {
            // A null or empty output array is taken to mean "ignore my outputs"
            // for processors that normally produce output.
            if (output == null || output.Length == 0)
            {
                return;
            }

            int outArgCount = processor.OutArguments.Count;
            if (output.Length != outArgCount)
            {
                throw new InvalidOperationException(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        SR.ProcessorReceivedWrongNumberOfValues,
                        processor.GetType().Name,
                        outArgCount,
                        output.Length));
            }

            Debug.Assert(outArgCount == output.Length, "SetProcessorOutput -- array length does not match output value count");

            int processorIndex = this.IndexOfProcessor(processor);
            for (int outArgIndex = 0; outArgIndex < outArgCount; ++outArgIndex)
            {
                ProcessorArgument outArg;
                ProcessorArgument[] inArgs;
                int[] inputValueOffsets = this.ContextInfo.GetOutputValueInfo(processorIndex, outArgIndex, out outArg, out inArgs);

                for (int inArgIndex = 0; inArgIndex < inputValueOffsets.Length; ++inArgIndex)
                {
                    object value = output[outArgIndex];
                    this.OnWriteInput(outArg, inArgs[inArgIndex], value);
                }
            }
        }