forked from VirtoCommerce/vc-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract static class LicenseProvider for License info supplying
- Loading branch information
1 parent
c0ad394
commit d8c3cd4
Showing
5 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Web.Hosting; | ||
|
||
namespace VirtoCommerce.Platform.Web.Licensing | ||
{ | ||
public static class LicenseProvider | ||
{ | ||
public static License LoadLicense() | ||
{ | ||
License license = null; | ||
var licenseFilePath = HostingEnvironment.MapPath(Startup.VirtualRoot + "/App_Data/VirtoCommerce.lic"); | ||
if (System.IO.File.Exists(licenseFilePath)) | ||
{ | ||
var rawLicense = System.IO.File.ReadAllText(licenseFilePath); | ||
license = License.Parse(rawLicense); | ||
|
||
if (license != null) | ||
{ | ||
license.RawLicense = null; | ||
} | ||
} | ||
return license; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters