Example #1
0
        /// <summary>
        /// Gets the connection string with decrypted value.
        /// </summary>
        /// <param name="encryptionMeta">The encryption meta.</param>
        /// <param name="settings">The settings.</param>
        /// <param name="connectionStringKey">The connection string key.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">settings;The expected configuration settings are not here.</exception>
        public static string GetConnectionStringWithDecryptedValue(this EncryptionMetadata encryptionMeta, ConnectionStringSettings settings, string connectionStringKey)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings", "The expected configuration settings are not here.");
            }

            return(encryptionMeta.GetConnectionStringWithDecryptedValue(settings.ConnectionString, connectionStringKey));
        }