/// <summary>Initiate plugin for Receive-Only mode to retrieve attachments using SAS URI. </summary>
        /// <param name="client"><see cref="QueueClient"/>, <see cref="SubscriptionClient"/>, <see cref="QueueClient"/>, <see cref="MessageSender"/>, <see cref="MessageReceiver"/>, or <see cref="SessionClient"/> to register plugin with.</param>
        /// <param name="messagePropertyToIdentifySasUri">Message property name to be used to retrieve message SAS UI.</param>
        /// <returns>Registered plugin as <see cref="ServiceBusPlugin"/>.</returns>
        public static ServiceBusPlugin RegisterAzureStorageAttachmentPluginForReceivingOnly(this ClientEntity client, string messagePropertyToIdentifySasUri = AzureStorageAttachmentConfigurationExtensions.DefaultMessagePropertyToIdentitySasUri)
        {
            var plugin = new ReceiveOnlyAzureStorageAttachment(messagePropertyToIdentifySasUri);

            client.RegisterPlugin(plugin);

            return(plugin);
        }
Ejemplo n.º 2
0
 protected TopicClient(ServiceBusConnection serviceBusConnection, string entityPath)
     : base($"{nameof(TopicClient)}{ClientEntity.GetNextId()}({entityPath})")
 {
     this.ServiceBusConnection = serviceBusConnection;
     this.TopicName            = entityPath;
 }
 /// <summary>
 /// Register compression plugin.
 /// <remarks>GZip compression will be used.</remarks>
 /// <param name="client"></param>
 /// <param name="minimumSizeToApplyCompression">Minimum size of message body for compression to be applied.</param>
 /// </summary>
 public static ServiceBusPlugin RegisterCompressionPlugin(this ClientEntity client, int minimumSizeToApplyCompression = GzipCompressionConfiguration.MinimumCompressionSize)
 {
     return(client.RegisterCompressionPlugin(new GzipCompressionConfiguration(minimumSizeToApplyCompression)));
 }