示例#1
0
        public override LicenseSourceResult Find(string applicationName)
        {
            if (File.Exists(location))
            {
                return(ValidateLicense(NonBlockingReader.ReadAllTextWithoutLocking(location), applicationName));
            }

            return(new LicenseSourceResult
            {
                Location = location,
                Result = $"License not found in {location}"
            });
        }
示例#2
0
        LicenseSourceResult ReadExternalLicense(string applicationName)
        {
            var appConfigLicenseFile = ConfigurationManager.AppSettings["NServiceBus/LicensePath"];

            if (!string.IsNullOrEmpty(appConfigLicenseFile))
            {
                if (File.Exists(appConfigLicenseFile))
                {
                    return(ValidateLicense(NonBlockingReader.ReadAllTextWithoutLocking(appConfigLicenseFile), applicationName));
                }
            }
            return(new LicenseSourceResult
            {
                Location = location,
                Result = $"License file not found in path supplied by app config file setting 'NServiceBus/LicensePath'. Value was '{appConfigLicenseFile}'"
            });
        }
示例#3
0
        public override LicenseSourceResult Find(string applicationName)
        {
            var licensePath = ConfigurationManager.AppSettings["NServiceBus/LicensePath"];

            if (!string.IsNullOrEmpty(licensePath))
            {
                if (File.Exists(licensePath))
                {
                    return(ValidateLicense(NonBlockingReader.ReadAllTextWithoutLocking(licensePath), applicationName));
                }
            }

            return(new LicenseSourceResult
            {
                Location = location,
                Result = $"License file not found in path supplied by app config 'NServiceBus/LicensePath' setting. Value was '{licensePath}'"
            });
        }