示例#1
0
        /// <summary>
        /// Allows user to specify the license string.
        /// </summary>
        /// <param name="config">The current <see cref="BusConfiguration"/>.</param>
        /// <param name="licenseText">The license text.</param>
// ReSharper disable UnusedParameter.Global
        public static void License(this BusConfiguration config, string licenseText)
// ReSharper restore UnusedParameter.Global
        {
            if (string.IsNullOrWhiteSpace(licenseText))
            {
                throw new ArgumentException("licenseText is required", "licenseText");
            }
            Logger.Info(@"Using license supplied via fluent API.");
            LicenseManager.InitializeLicenseText(licenseText);
        }
示例#2
0
        /// <summary>
        /// Allows user to specify the license string.
        /// </summary>
        /// <param name="config">The current <see cref="Configure"/>.</param>
        /// <param name="licenseText">The license text.</param>
        /// <returns>The current <see cref="Configure"/>.</returns>
        public static Configure License(this Configure config, string licenseText)
        {
            if (string.IsNullOrWhiteSpace(licenseText))
            {
                throw new ArgumentException("licenseText is required", "licenseText");
            }
            Logger.Info(@"Using license supplied via fluent API.");
            LicenseManager.InitializeLicenseText(licenseText);

            return(config);
        }