예제 #1
0
 /// <summary>
 /// Gets the content of a document if it exists in the buffer.
 /// </summary>
 /// <param name="key">Document Uri.</param>
 /// <param name="content">Document content.</param>
 /// <returns>Whether or not the operation succeeded.</returns>
 /// <seealso cref="DocumentContent"/>
 public bool TryGet(string key, out DocumentContent content)
 {
     return(this.documentContents.TryGetValue(key, out content));
 }
예제 #2
0
 /// <summary>
 /// Adds a document to the service buffer.
 /// </summary>
 /// <param name="key">Document Uri.</param>
 /// <param name="content">Document content.</param>
 /// <seealso cref="DocumentContent"/>
 public void AddOrUpdate(string key, DocumentContent content)
 {
     this.documentContents.AddOrUpdate(key, content, (aKey, oldValue) => content);
 }