internal DocumentViewerContent CreateContent(Dictionary <string, object> dataDict) { VerifyState(State.CustomDataProviders); state = State.ContentCreated; Debug.Assert(cachedText == stringBuilder.ToString()); return(new DocumentViewerContent(cachedText, cachedTextColorsCollection, referenceBuilder.Create(), dataDict)); }
public DocumentViewerContent CreateContent(Dictionary <string, object> dataDict) { if (hasCreatedResult) { throw new InvalidOperationException(nameof(CreateContent) + " can only be called once"); } hasCreatedResult = true; Debug.Assert(GetCachedText() == stringBuilder.ToString()); return(new DocumentViewerContent(GetCachedText(), cachedTextColorsCollection, referenceBuilder.Create(), dataDict)); }