当前位置: 首页>>代码示例>>C#>>正文


C# MessageEncoderSettings类代码示例

本文整理汇总了C#中MessageEncoderSettings的典型用法代码示例。如果您正苦于以下问题:C# MessageEncoderSettings类的具体用法?C# MessageEncoderSettings怎么用?C# MessageEncoderSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MessageEncoderSettings类属于命名空间,在下文中一共展示了MessageEncoderSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BulkDeleteOperationEmulator

 // constructors
 public BulkDeleteOperationEmulator(
     CollectionNamespace collectionNamespace,
     IEnumerable<DeleteRequest> requests,
     MessageEncoderSettings messageEncoderSettings)
     : base(collectionNamespace, requests, messageEncoderSettings)
 {
 }
开发者ID:narutoswj,项目名称:mongo-csharp-driver,代码行数:8,代码来源:BulkDeleteOperationEmulator.cs

示例2: Setup

 public void Setup()
 {
     _collectionNamespace = new CollectionNamespace("foo", "bar");
     _fieldName = "a.b";
     _messageEncoderSettings = new MessageEncoderSettings();
     _valueSerializer = new Int32Serializer();
 }
开发者ID:rmattos,项目名称:mongo-csharp-driver,代码行数:7,代码来源:DistinctOperationTests.cs

示例3: MessageJsonEncoderBase

 // constructor
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageJsonEncoderBase"/> class.
 /// </summary>
 /// <param name="textReader">The text reader.</param>
 /// <param name="textWriter">The text writer.</param>
 /// <param name="encoderSettings">The encoder settings.</param>
 protected MessageJsonEncoderBase(TextReader textReader, TextWriter textWriter, MessageEncoderSettings encoderSettings)
 {
     Ensure.That(textReader != null || textWriter != null, "textReader and textWriter cannot both be null.");
     _textReader = textReader;
     _textWriter = textWriter;
     _encoderSettings = encoderSettings;
 }
开发者ID:fir3pho3nixx,项目名称:mongo-csharp-driver,代码行数:14,代码来源:MessageJsonEncoderBase.cs

示例4: BulkUpdateOperation

 // constructors
 public BulkUpdateOperation(
     CollectionNamespace collectionNamespace,
     IEnumerable<UpdateRequest> requests,
     MessageEncoderSettings messageEncoderSettings)
     : base(collectionNamespace, requests, messageEncoderSettings)
 {
 }
开发者ID:rmattos,项目名称:mongo-csharp-driver,代码行数:8,代码来源:BulkUpdateOperation.cs

示例5: MapReduceOperationBase

 // constructors
 /// <summary>
 /// Initializes a new instance of the <see cref="MapReduceOperationBase"/> class.
 /// </summary>
 /// <param name="collectionNamespace">The collection namespace.</param>
 /// <param name="mapFunction">The map function.</param>
 /// <param name="reduceFunction">The reduce function.</param>
 /// <param name="messageEncoderSettings">The message encoder settings.</param>
 protected MapReduceOperationBase(CollectionNamespace collectionNamespace, BsonJavaScript mapFunction, BsonJavaScript reduceFunction, MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, nameof(collectionNamespace));
     _mapFunction = Ensure.IsNotNull(mapFunction, nameof(mapFunction));
     _reduceFunction = Ensure.IsNotNull(reduceFunction, nameof(reduceFunction));
     _messageEncoderSettings = Ensure.IsNotNull(messageEncoderSettings, nameof(messageEncoderSettings));
 }
开发者ID:mfidemraizer,项目名称:mongo-csharp-driver,代码行数:15,代码来源:MapReduceOperationBase.cs

示例6: MapReduceOperationBase

 // constructors
 protected MapReduceOperationBase(CollectionNamespace collectionNamespace, BsonJavaScript mapFunction, BsonJavaScript reduceFunction, BsonDocument query, MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _mapFunction = Ensure.IsNotNull(mapFunction, "mapFunction");
     _reduceFunction = Ensure.IsNotNull(reduceFunction, "reduceFunction");
     _query = query;
     _messageEncoderSettings = messageEncoderSettings;
 }
开发者ID:bollinim,项目名称:mongo-csharp-driver,代码行数:9,代码来源:MapReduceOperationBase.cs

示例7: UpdateOpcodeOperationEmulator

 // constructors
 public UpdateOpcodeOperationEmulator(
     CollectionNamespace collectionNamespace,
     UpdateRequest request,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _request = Ensure.IsNotNull(request, "request");
     _messageEncoderSettings = Ensure.IsNotNull(messageEncoderSettings, "messageEncoderSettings");
 }
开发者ID:kay-kim,项目名称:mongo-csharp-driver,代码行数:10,代码来源:UpdateOpcodeOperationEmulator.cs

示例8: UpdateOpcodeOperationEmulator

 // constructors
 public UpdateOpcodeOperationEmulator(
     CollectionNamespace collectionNamespace,
     UpdateRequest request,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, nameof(collectionNamespace));
     _request = Ensure.IsNotNull(request, nameof(request));
     _messageEncoderSettings = Ensure.IsNotNull(messageEncoderSettings, nameof(messageEncoderSettings));
 }
开发者ID:RainsSoft,项目名称:mongo-csharp-driver,代码行数:10,代码来源:UpdateOpcodeOperationEmulator.cs

示例9: BulkUnmixedWriteOperationEmulatorBase

 // constructors
 protected BulkUnmixedWriteOperationEmulatorBase(
     CollectionNamespace collectionNamespace,
     IEnumerable<WriteRequest> requests,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, nameof(collectionNamespace));
     _requests = Ensure.IsNotNull(requests, nameof(requests));
     _messageEncoderSettings = messageEncoderSettings;
 }
开发者ID:narutoswj,项目名称:mongo-csharp-driver,代码行数:10,代码来源:BulkUnmixedWriteOperationEmulatorBase.cs

示例10: AggregateOperationBase

 // constructors
 protected AggregateOperationBase(
     CollectionNamespace collectionNamespace,
     IEnumerable<BsonDocument> pipeline,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _pipeline = Ensure.IsNotNull(pipeline, "pipeline").ToList();
     _messageEncoderSettings = messageEncoderSettings;
 }
开发者ID:bollinim,项目名称:mongo-csharp-driver,代码行数:10,代码来源:AggregateOperationBase.cs

示例11: DeleteOpcodeOperationEmulator

 // constructors
 public DeleteOpcodeOperationEmulator(
     CollectionNamespace collectionNamespace,
     BsonDocument criteria,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _criteria = Ensure.IsNotNull(criteria, "criteria");
     _messageEncoderSettings = messageEncoderSettings;
 }
开发者ID:rmattos,项目名称:mongo-csharp-driver,代码行数:10,代码来源:DeleteOpcodeOperationEmulator.cs

示例12: DeleteWireProtocol

 // constructors
 public DeleteWireProtocol(
     CollectionNamespace collectionNamespace,
     BsonDocument query,
     bool isMulti,
     MessageEncoderSettings messageEncoderSettings,
     WriteConcern writeConcern)
     : base(collectionNamespace, messageEncoderSettings, writeConcern)
 {
     _query = Ensure.IsNotNull(query, "query");
     _isMulti = isMulti;
 }
开发者ID:kay-kim,项目名称:mongo-csharp-driver,代码行数:12,代码来源:DeleteWireProtocol.cs

示例13: UpdateOpcodeOperationEmulator

 // constructors
 public UpdateOpcodeOperationEmulator(
     CollectionNamespace collectionNamespace,
     BsonDocument query,
     BsonDocument update,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _criteria = Ensure.IsNotNull(query, "criteria");
     _update = Ensure.IsNotNull(update, "update");
     _messageEncoderSettings = messageEncoderSettings;
 }
开发者ID:rmattos,项目名称:mongo-csharp-driver,代码行数:12,代码来源:UpdateOpcodeOperationEmulator.cs

示例14: constructor_with_key_should_throw_when_initial_is_null

        public void constructor_with_key_should_throw_when_initial_is_null()
        {
            var collectionNamespace = new CollectionNamespace("databaseName", "collectionName");
            var key = new BsonDocument("key", 1);
            var reduceFunction = new BsonJavaScript("reduceFunction");
            var filter = new BsonDocument("y", 1);
            var messageEncoderSettings = new MessageEncoderSettings();

            Action action = () => new GroupOperation<BsonDocument>(collectionNamespace, key, null, reduceFunction, filter, messageEncoderSettings);

            action.ShouldThrow<ArgumentNullException>();
        }
开发者ID:RavenZZ,项目名称:MDRelation,代码行数:12,代码来源:GroupOperationTests.cs

示例15: DeserializeBatch_should_return_expected_result_when_batch_is_empty

        public void DeserializeBatch_should_return_expected_result_when_batch_is_empty()
        {
            var document = BsonDocument.Parse("{ batch : [ ] }");
            var bson = document.ToBson();
            var rawDocument = new RawBsonDocument(bson);
            var batch = (RawBsonArray)rawDocument["batch"];
            var documentSerializer = BsonDocumentSerializer.Instance;
            var messageEncoderSettings = new MessageEncoderSettings();

            var result = CursorBatchDeserializationHelper.DeserializeBatch<BsonDocument>(batch, documentSerializer, messageEncoderSettings);

            result.Count.Should().Be(0);
        }
开发者ID:RavenZZ,项目名称:MDRelation,代码行数:13,代码来源:CursorBatchDeserializationHelperTests.cs


注:本文中的MessageEncoderSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。