public PatchCommand(DocumentConventions conventions, JsonOperationContext context, string id, string changeVector, PatchRequest patch, PatchRequest patchIfMissing, bool skipPatchIfChangeVectorMismatch, bool returnDebugInformation, bool test) { if (conventions == null) { throw new ArgumentNullException(nameof(conventions)); } if (patch == null) { throw new ArgumentNullException(nameof(patch)); } if (string.IsNullOrWhiteSpace(patch.Script)) { throw new ArgumentNullException(nameof(patch.Script)); } if (patchIfMissing != null && string.IsNullOrWhiteSpace(patchIfMissing.Script)) { throw new ArgumentNullException(nameof(patchIfMissing.Script)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } _id = id ?? throw new ArgumentNullException(nameof(id)); _changeVector = changeVector; _patch = EntityToBlittable.ConvertCommandToBlittable(new { Patch = patch, PatchIfMissing = patchIfMissing }, context); _skipPatchIfChangeVectorMismatch = skipPatchIfChangeVectorMismatch; _returnDebugInformation = returnDebugInformation; _test = test; }
public PatchOperation(string id, string changeVector, PatchRequest patch, PatchRequest patchIfMissing = null, bool skipPatchIfChangeVectorMismatch = false) : base(id, changeVector, patch, patchIfMissing, skipPatchIfChangeVectorMismatch) { }