private void Transform(IProcessor processor, Stream inputStream, Stream outputStream) { ITransformer transformer = CreateTransformer(); processor.TransformString += (_, e) => transformer.Apply(e); processor.Transform(inputStream, outputStream); }