| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- /* Copyright 2010-present MongoDB Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using MongoDB.Driver.Core.Misc;
- using MongoDB.Driver.Core.Operations;
- namespace MongoDB.Driver
- {
- /// <summary>
- /// Options for updating a single document.
- /// </summary>
- public sealed class UpdateOptions
- {
- // fields
- private IEnumerable<ArrayFilterDefinition> _arrayFilters;
- private bool? _bypassDocumentValidation;
- private Collation _collation;
- private bool _isUpsert;
- // properties
- /// <summary>
- /// Gets or sets the array filters.
- /// </summary>
- /// <value>
- /// The array filters.
- /// </value>
- public IEnumerable<ArrayFilterDefinition> ArrayFilters
- {
- get { return _arrayFilters; }
- set { _arrayFilters = value; }
- }
- /// <summary>
- /// Gets or sets a value indicating whether to bypass document validation.
- /// </summary>
- public bool? BypassDocumentValidation
- {
- get { return _bypassDocumentValidation; }
- set { _bypassDocumentValidation = value; }
- }
- /// <summary>
- /// Gets or sets the collation.
- /// </summary>
- public Collation Collation
- {
- get { return _collation; }
- set { _collation = value; }
- }
- /// <summary>
- /// Gets or sets a value indicating whether to insert the document if it doesn't already exist.
- /// </summary>
- public bool IsUpsert
- {
- get { return _isUpsert; }
- set { _isUpsert = value; }
- }
- }
- }
|