コード例 #1
0
        public static PublisherModelUnit To(this PublisherModelUnit @this, string routingKey = "")
        {
            var convertedBody = Encoding.UTF8.GetBytes(@this.ModelUnit.Message);

            @this.ModelUnit.Model.BasicPublish(exchange: @this.ModelUnit.ExchangeName,
                                               routingKey: routingKey,
                                               basicProperties: @this.ModelUnit.Properties,
                                               body: convertedBody);

            return(@this);
        }
コード例 #2
0
 public static PublisherModelUnit Send(this PublisherModelUnit @this, string message)
 {
     @this.ModelUnit.Message = message;
     return(@this);
 }