public static ReadAllTextWithoutLocking ( string path ) : string | ||
path | string | |
Résultat | string |
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}" }); }
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}'" }); }
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}'" }); }