Skip to content

Commit

Permalink
Fixed constructorrs
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Nov 6, 2024
1 parent aae6821 commit db7cadd
Showing 1 changed file with 60 additions and 3 deletions.
63 changes: 60 additions & 3 deletions src/MongoDB.Driver/BulkWriteUpdateOneModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,60 @@ public sealed class BulkWriteUpdateOneModel<TDocument> : BulkWriteModel
/// <param name="hint">The index to use.</param>
/// <param name="isUpsert">Indicating whether to insert the document if it doesn't already exist.</param>
/// <param name="arrayFilters">A set of filters specifying to which array elements an update should apply.</param>
public BulkWriteUpdateOneModel(
string collectionNamespace,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
Collation collation = null,
BsonValue hint = null,
bool isUpsert = false,
IEnumerable<ArrayFilterDefinition> arrayFilters = null)
: this(CollectionNamespace.FromFullName(collectionNamespace), filter, update, collation, hint, isUpsert, arrayFilters, sort: null)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="BulkWriteUpdateOneModel{TDocument}"/> class.
/// </summary>
/// <param name="collectionNamespace">Collection on which the operation should be performed.</param>
/// <param name="filter">The filter to apply.</param>
/// <param name="update">Update definition.</param>
/// <param name="collation">Specifies a collation.</param>
/// <param name="hint">The index to use.</param>
/// <param name="isUpsert">Indicating whether to insert the document if it doesn't already exist.</param>
/// <param name="arrayFilters">A set of filters specifying to which array elements an update should apply.</param>
public BulkWriteUpdateOneModel(
CollectionNamespace collectionNamespace,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
Collation collation = null,
BsonValue hint = null,
bool isUpsert = false,
IEnumerable<ArrayFilterDefinition> arrayFilters = null)
: this(collectionNamespace, filter, update, collation, hint, isUpsert, arrayFilters, sort: null)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="BulkWriteUpdateOneModel{TDocument}"/> class.
/// </summary>
/// <param name="collectionNamespace">Collection on which the operation should be performed.</param>
/// <param name="filter">The filter to apply.</param>
/// <param name="update">Update definition.</param>
/// <param name="sort">The sort definition to use.</param>
/// <param name="collation">Specifies a collation.</param>
/// <param name="hint">The index to use.</param>
/// <param name="isUpsert">Indicating whether to insert the document if it doesn't already exist.</param>
/// <param name="arrayFilters">A set of filters specifying to which array elements an update should apply.</param>
public BulkWriteUpdateOneModel(
string collectionNamespace,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
SortDefinition<TDocument> sort,
Collation collation = null,
BsonValue hint = null,
bool isUpsert = false,
IEnumerable<ArrayFilterDefinition> arrayFilters = null,
SortDefinition<TDocument> sort = null)
IEnumerable<ArrayFilterDefinition> arrayFilters = null)
: this(CollectionNamespace.FromFullName(collectionNamespace), filter, update, collation, hint, isUpsert, arrayFilters, sort)
{
}
Expand All @@ -56,12 +100,25 @@ public BulkWriteUpdateOneModel(
/// <param name="collectionNamespace">Collection on which the operation should be performed.</param>
/// <param name="filter">The filter to apply.</param>
/// <param name="update">Update definition.</param>
/// <param name="sort">The sort definition to use.</param>
/// <param name="collation">Specifies a collation.</param>
/// <param name="hint">The index to use.</param>
/// <param name="isUpsert">Indicating whether to insert the document if it doesn't already exist.</param>
/// <param name="arrayFilters">A set of filters specifying to which array elements an update should apply.</param>
/// <param name="sort">The sort definition to use.</param>
public BulkWriteUpdateOneModel(
CollectionNamespace collectionNamespace,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
SortDefinition<TDocument> sort,
Collation collation = null,
BsonValue hint = null,
bool isUpsert = false,
IEnumerable<ArrayFilterDefinition> arrayFilters = null)
: this(collectionNamespace, filter, update, collation, hint, isUpsert, arrayFilters, sort)
{
}

private BulkWriteUpdateOneModel(
CollectionNamespace collectionNamespace,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
Expand Down

0 comments on commit db7cadd

Please sign in to comment.