/// <summary> /// Adds the or remove spec opt. /// </summary> /// <param name = "key">The key.</param> /// <param name = "doc">The doc.</param> private void AddOrRemoveSpecOpt(string key, object doc) { if (doc == null) { _specOpts.Remove(key); } else { _specOpts[key] = doc; } }
/// <summary> /// Copies to items to destinationDocument. /// </summary> /// <param name="destinationDocument">The destination document.</param> public void CopyTo(Document destinationDocument) { if (destinationDocument == null) { throw new ArgumentNullException("destinationDocument"); } //Todo: Fix any accidental reordering issues. foreach (var key in _orderedKeys) { if (destinationDocument.ContainsKey(key)) { destinationDocument.Remove(key); } destinationDocument[key] = this[key]; } }