/// <summary>Instantiate plugin with the required configuration.</summary>
        /// <param name="client"><see cref="IClientEntity"/>, <see cref="SubscriptionClient"/>, <see cref="QueueClient"/>, <see cref="MessageSender"/>, <see cref="MessageReceiver"/>, or <see cref="SessionClient"/> to register plugin with.</param>
        /// <param name="configuration"><see cref="AzureStorageAttachmentConfiguration"/> object.</param>
        /// <returns>Registered plugin as <see cref="ServiceBusPlugin"/>.</returns>
        public static ServiceBusPlugin RegisterAzureStorageAttachmentPlugin(this IClientEntity client, AzureStorageAttachmentConfiguration configuration)
        {
            var plugin = new AzureStorageAttachment(configuration);

            client.RegisterPlugin(plugin);

            return(plugin);
        }
        /// <summary>Initiate plugin for Receive-Only mode to retrieve attachments using SAS URI. </summary>
        /// <param name="client"><see cref="IClientEntity"/>, <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 IClientEntity client, string messagePropertyToIdentifySasUri = AzureStorageAttachmentConfigurationExtensions.DefaultMessagePropertyToIdentitySasUri)
        {
            var plugin = new ReceiveOnlyAzureStorageAttachment(messagePropertyToIdentifySasUri);

            client.RegisterPlugin(plugin);

            return(plugin);
        }
Esempio n. 3
0
        public static IClientEntity EnableRijndaelManagedEncryption(this IClientEntity clientEntity, string cryptoKey, string initVectorKey)
        {
            ICryptographyProvider provider = new RijndaelManagedCryptographyProvider(cryptoKey, initVectorKey);

            clientEntity.RegisterPlugin(new MessagePayloadEncryptionPlugin(provider));

            return(clientEntity);
        }