示例#1
0
 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));
 }
示例#2
0
 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));
 }