本文整理汇总了C#中MongoDB.Bson.IO.BsonBinaryWriterSettings类的典型用法代码示例。如果您正苦于以下问题:C# BsonBinaryWriterSettings类的具体用法?C# BsonBinaryWriterSettings怎么用?C# BsonBinaryWriterSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BsonBinaryWriterSettings类属于MongoDB.Bson.IO命名空间,在下文中一共展示了BsonBinaryWriterSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public static BsonWriter Create(
Stream stream,
BsonBinaryWriterSettings settings
)
{
return new BsonBinaryWriter(stream, null, BsonBinaryWriterSettings.Defaults);
}
示例2: BulkDeleteOperationArgs
// constructors
public BulkDeleteOperationArgs(
string collectionName,
string databaseName,
int maxBatchCount,
int maxBatchLength,
int maxDocumentSize,
int maxWireDocumentSize,
bool isOrdered,
BsonBinaryReaderSettings readerSettings,
IEnumerable<DeleteRequest> requests,
WriteConcern writeConcern,
BsonBinaryWriterSettings writerSettings)
: base(
collectionName,
databaseName,
maxBatchCount,
maxBatchLength,
maxDocumentSize,
maxWireDocumentSize,
isOrdered,
readerSettings,
requests.Cast<WriteRequest>(),
writeConcern,
writerSettings)
{
}
示例3: MongoInsertMessage
// constructors
internal MongoInsertMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkElementNames, InsertFlags flags)
: base(MessageOpcode.Insert, null, writerSettings)
{
this.collectionFullName = collectionFullName;
this.checkElementNames = checkElementNames;
this.flags = flags;
}
示例4: MongoDeleteMessage
// constructors
internal MongoDeleteMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, RemoveFlags flags, IMongoQuery query)
: base(MessageOpcode.Delete, null, writerSettings)
{
_collectionFullName = collectionFullName;
_flags = flags;
_query = query;
}
示例5: BulkMixedWriteOperation
// constructors
public BulkMixedWriteOperation(
Action<InsertRequest> assignId,
bool checkElementNames,
string collectionName,
string databaseName,
int maxBatchCount,
int maxBatchLength,
int maxDocumentSize,
int maxWireDocumentSize,
bool isOrdered,
BsonBinaryReaderSettings readerSettings,
IEnumerable<WriteRequest> requests,
WriteConcern writeConcern,
BsonBinaryWriterSettings writerSettings)
{
_assignId = assignId;
_checkElementNames = checkElementNames;
_collectionName = collectionName;
_databaseName = databaseName;
_maxBatchCount = maxBatchCount;
_maxBatchLength = maxBatchLength;
_maxDocumentSize = maxDocumentSize;
_maxWireDocumentSize = maxWireDocumentSize;
_isOrdered = isOrdered;
_readerSettings = readerSettings;
_requests = requests;
_writeConcern = writeConcern;
_writerSettings = writerSettings;
}
示例6: BulkWriteOperationArgs
// constructors
protected BulkWriteOperationArgs(
string collectionName,
string databaseName,
int maxBatchCount,
int maxBatchLength,
int maxDocumentSize,
int maxWireDocumentSize,
bool isOrdered,
BsonBinaryReaderSettings readerSettings,
IEnumerable<WriteRequest> requests,
WriteConcern writeConcern,
BsonBinaryWriterSettings writerSettings)
{
_collectionName = collectionName;
_databaseName = databaseName;
_maxBatchCount = maxBatchCount;
_maxBatchLength = maxBatchLength;
_maxDocumentSize = maxDocumentSize;
_maxWireDocumentSize = maxWireDocumentSize;
_isOrdered = isOrdered;
_readerSettings = readerSettings;
_requests = requests;
_writeConcern = writeConcern;
_writerSettings = writerSettings;
}
示例7: MongoInsertMessage
internal MongoInsertMessage(
BsonBinaryWriterSettings writerSettings,
string collectionFullName
)
: base(MessageOpcode.Insert, null, writerSettings) {
this.collectionFullName = collectionFullName;
}
示例8: BulkInsertOperationArgs
// constructors
public BulkInsertOperationArgs(
Action<InsertRequest> assignId,
bool checkElementNames,
string collectionName,
string databaseName,
int maxBatchCount,
int maxBatchLength,
int maxDocumentSize,
int maxWireDocumentSize,
bool isOrdered,
BsonBinaryReaderSettings readerSettings,
IEnumerable<InsertRequest> requests,
WriteConcern writeConcern,
BsonBinaryWriterSettings writerSettings)
: base(
collectionName,
databaseName,
maxBatchCount,
maxBatchLength,
maxDocumentSize,
maxWireDocumentSize,
isOrdered,
readerSettings,
requests.Cast<WriteRequest>(),
writeConcern,
writerSettings)
{
_assignId = assignId;
_checkElementNames = checkElementNames;
}
示例9: MongoRequestMessage
private int _messageStartPosition = -1; // start position in buffer for backpatching messageLength
// constructors
protected MongoRequestMessage(
MessageOpcode opcode,
BsonBinaryWriterSettings writerSettings)
: base(opcode)
{
_writerSettings = writerSettings;
RequestId = Interlocked.Increment(ref __lastRequestId);
}
示例10: ReadOperationBase
protected ReadOperationBase(
string databaseName,
string collectionName,
BsonBinaryReaderSettings readerSettings,
BsonBinaryWriterSettings writerSettings)
: base(databaseName, collectionName, readerSettings, writerSettings)
{
}
示例11: MongoUpdateMessage
// constructors
internal MongoUpdateMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkUpdateDocument, UpdateFlags flags, IMongoQuery query, IMongoUpdate update)
: base(MessageOpcode.Update, null, writerSettings)
{
this.collectionFullName = collectionFullName;
this.checkUpdateDocument = checkUpdateDocument;
this.flags = flags;
this.query = query;
this.update = update;
}
示例12: WriteOpcodeOperationBase
protected WriteOpcodeOperationBase(
string databaseName,
string collectionName,
BsonBinaryReaderSettings readerSettings,
BsonBinaryWriterSettings writerSettings,
WriteConcern writeConcern)
: base(databaseName, collectionName, readerSettings, writerSettings)
{
_writeConcern = writeConcern;
}
示例13: MongoQueryMessage
internal MongoQueryMessage(BsonBuffer buffer, BsonBinaryWriterSettings writerSettings, string collectionFullName, QueryFlags flags, int numberToSkip, int numberToReturn, IMongoQuery query, IMongoFields fields)
: base(MessageOpcode.Query, buffer, writerSettings)
{
this.collectionFullName = collectionFullName;
this.flags = flags;
this.numberToSkip = numberToSkip;
this.numberToReturn = numberToReturn;
this.query = query;
this.fields = fields;
}
示例14: MongoQueryMessage
// constructors
internal MongoQueryMessage(
BsonBinaryWriterSettings writerSettings,
string collectionFullName,
QueryFlags flags,
int numberToSkip,
int numberToReturn,
IMongoQuery query,
IMongoFields fields)
: this(null, writerSettings, collectionFullName, flags, numberToSkip, numberToReturn, query, fields)
{
}
示例15: DatabaseOperation
protected DatabaseOperation(
string databaseName,
string collectionName,
BsonBinaryReaderSettings readerSettings,
BsonBinaryWriterSettings writerSettings)
{
_databaseName = databaseName;
_collectionName = collectionName;
_readerSettings = (BsonBinaryReaderSettings)readerSettings.FrozenCopy();
_writerSettings = (BsonBinaryWriterSettings)writerSettings.FrozenCopy();
}