Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit ed535a3

Browse files
committed
Add useful licensing overload
1 parent bc5dbec commit ed535a3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ServiceStack.Text/LicenseUtils.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ public static void RegisterLicenseFromFile(string filePath)
7575
var licenseKeyText = filePath.ReadAllText();
7676
LicenseUtils.RegisterLicense(licenseKeyText);
7777
}
78+
79+
public static void RegisterLicenseFromFileIfExists(string filePath)
80+
{
81+
if (!filePath.FileExists())
82+
return;
83+
84+
var licenseKeyText = filePath.ReadAllText();
85+
LicenseUtils.RegisterLicense(licenseKeyText);
86+
}
7887
}
7988

8089
public class LicenseKey

0 commit comments

Comments
 (0)