예제 #1
0
        /// <summary>Creates a batch where event data objects can be added for later SendAsync call.</summary>
        /// <param name="options"><see cref="BatchOptions" /> to define partition key and max message size.</param>
        /// <returns>Returns <see cref="EventDataBatch" />.</returns>
        public EventDataBatch CreateBatch(BatchOptions options)
        {
            if (!string.IsNullOrWhiteSpace(options.PartitionKey))
            {
                throw Fx.Exception.InvalidOperation(Resources.PartitionSenderInvalidWithPartitionKeyOnBatch);
            }

            return(new EventDataBatch(options.MaxMessageSize > 0 ? options.MaxMessageSize : this.InnerSender.MaxMessageSize));
        }
예제 #2
0
 /// <summary>Creates a batch where event data objects can be added for later SendAsync call.</summary>
 /// <param name="options"><see cref="BatchOptions" /> to define partition key and max message size.</param>
 /// <returns>Returns <see cref="EventDataBatch" />.</returns>
 public EventDataBatch CreateBatch(BatchOptions options)
 {
     return(new EventDataBatch(options.MaxMessageSize > 0 ?
                               options.MaxMessageSize : this.InnerSender.MaxMessageSize, options.PartitionKey));
 }