protected AbstractPasteProcessor(
            string newLine,
            string indentationWhitespace,
            ITextSnapshot snapshotBeforePaste,
            ITextSnapshot snapshotAfterPaste,
            Document documentBeforePaste,
            Document documentAfterPaste,
            ExpressionSyntax stringExpressionBeforePaste)
        {
            NewLine = newLine;
            IndentationWhitespace = indentationWhitespace;

            SnapshotBeforePaste = snapshotBeforePaste;
            SnapshotAfterPaste  = snapshotAfterPaste;

            TextBeforePaste = SnapshotBeforePaste.AsText();
            TextAfterPaste  = SnapshotAfterPaste.AsText();

            DocumentBeforePaste = documentBeforePaste;
            DocumentAfterPaste  = documentAfterPaste;

            StringExpressionBeforePaste     = stringExpressionBeforePaste;
            StringExpressionBeforePasteInfo = StringInfo.GetStringInfo(TextBeforePaste, stringExpressionBeforePaste);
            TextContentsSpansAfterPaste     = StringExpressionBeforePasteInfo.ContentSpans.SelectAsArray(MapSpanForward);

            Contract.ThrowIfTrue(StringExpressionBeforePasteInfo.ContentSpans.IsEmpty);
        }