mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-08 00:14:31 +08:00
Removed merge conflict artifacts.
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
using IDeliverable.Licensing.Validation;
|
||||
using IDeliverable.Licensing.VerificationTokens;
|
||||
using Orchard;
|
||||
using Orchard.FileSystems.AppData;
|
||||
using Orchard.Settings;
|
||||
|
||||
namespace IDeliverable.Licensing.Orchard
|
||||
{
|
||||
public abstract class LicenseValidationHelperBase
|
||||
{
|
||||
protected LicenseValidationHelperBase(IAppDataFolder appDataFolder, IOrchardServices orchardServices) {
|
||||
OrchardServices = orchardServices;
|
||||
_appDataFolder = appDataFolder;
|
||||
}
|
||||
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
protected IOrchardServices OrchardServices { get; set; }
|
||||
protected ISite CurrentSite => OrchardServices.WorkContext.CurrentSite;
|
||||
|
||||
protected abstract string ProductId { get; }
|
||||
protected abstract string LicenseKey { get; }
|
||||
protected virtual bool SkipValidationForLocalRequests => false;
|
||||
|
||||
public void ValidateLicense()
|
||||
{
|
||||
// TODO: Throttle this code by caching its outcome (void or exception) for 5 minutes.
|
||||
|
||||
var licenseVerificationTokenStore = new LicenseVerificationTokenStore(_appDataFolder);
|
||||
var licenseVerificationTokenAccessor = new LicenseVerificationTokenAccessor(licenseVerificationTokenStore);
|
||||
var licenseValidator = new LicenseValidator(licenseVerificationTokenAccessor);
|
||||
|
||||
var options = LicenseValidationOptions.Default;
|
||||
if (SkipValidationForLocalRequests)
|
||||
options = options | LicenseValidationOptions.SkipForLocalRequests;
|
||||
|
||||
licenseValidator.ValidateLicense(ProductId, LicenseKey, options);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
using IDeliverable.Licensing.Validation;
|
||||
using IDeliverable.Licensing.VerificationTokens;
|
||||
using Orchard;
|
||||
using Orchard.FileSystems.AppData;
|
||||
using Orchard.Settings;
|
||||
|
||||
namespace IDeliverable.Licensing.Orchard
|
||||
{
|
||||
public abstract class LicenseValidationHelperBase
|
||||
{
|
||||
protected LicenseValidationHelperBase(IAppDataFolder appDataFolder, IOrchardServices orchardServices) {
|
||||
OrchardServices = orchardServices;
|
||||
_appDataFolder = appDataFolder;
|
||||
}
|
||||
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
protected IOrchardServices OrchardServices { get; set; }
|
||||
protected ISite CurrentSite => OrchardServices.WorkContext.CurrentSite;
|
||||
|
||||
protected abstract string ProductId { get; }
|
||||
protected abstract string LicenseKey { get; }
|
||||
protected virtual bool SkipValidationForLocalRequests => false;
|
||||
|
||||
public void ValidateLicense()
|
||||
{
|
||||
// TODO: Throttle this code by caching its outcome (void or exception) for 5 minutes.
|
||||
|
||||
var licenseVerificationTokenStore = new LicenseVerificationTokenStore(_appDataFolder);
|
||||
var licenseVerificationTokenAccessor = new LicenseVerificationTokenAccessor(licenseVerificationTokenStore);
|
||||
var licenseValidator = new LicenseValidator(licenseVerificationTokenAccessor);
|
||||
|
||||
var options = LicenseValidationOptions.Default;
|
||||
if (SkipValidationForLocalRequests)
|
||||
options = options | LicenseValidationOptions.SkipForLocalRequests;
|
||||
|
||||
licenseValidator.ValidateLicense(ProductId, LicenseKey, options);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using IDeliverable.Licensing.Validation;
|
||||
using IDeliverable.Licensing.VerificationTokens;
|
||||
using Orchard.FileSystems.AppData;
|
||||
|
||||
namespace IDeliverable.Licensing.Orchard
|
||||
{
|
||||
public abstract class LicenseValidationHelperBase
|
||||
{
|
||||
public LicenseValidationHelperBase(IAppDataFolder appDataFolder)
|
||||
{
|
||||
_appDataFolder = appDataFolder;
|
||||
}
|
||||
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
|
||||
protected abstract string ProductId { get; }
|
||||
protected abstract string LicenseKey { get; }
|
||||
protected virtual bool SkipValidationForLocalRequests => false;
|
||||
|
||||
public void ValidateLicense()
|
||||
{
|
||||
// TODO: Throttle this code by caching its outcome (void or exception) for 5 minutes.
|
||||
|
||||
var licenseVerificationTokenStore = new LicenseVerificationTokenStore(_appDataFolder);
|
||||
var licenseVerificationTokenAccessor = new LicenseVerificationTokenAccessor(licenseVerificationTokenStore);
|
||||
var licenseValidator = new LicenseValidator(licenseVerificationTokenAccessor);
|
||||
|
||||
var options = LicenseValidationOptions.Default;
|
||||
if (SkipValidationForLocalRequests)
|
||||
options = options | LicenseValidationOptions.SkipForLocalRequests;
|
||||
|
||||
licenseValidator.ValidateLicense(ProductId, LicenseKey, options);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
using IDeliverable.Licensing.Validation;
|
||||
using IDeliverable.Licensing.VerificationTokens;
|
||||
using Orchard;
|
||||
using Orchard.FileSystems.AppData;
|
||||
using Orchard.Settings;
|
||||
|
||||
namespace IDeliverable.Licensing.Orchard
|
||||
{
|
||||
public abstract class LicenseValidationHelperBase
|
||||
{
|
||||
protected LicenseValidationHelperBase(IAppDataFolder appDataFolder, IOrchardServices orchardServices) {
|
||||
OrchardServices = orchardServices;
|
||||
_appDataFolder = appDataFolder;
|
||||
}
|
||||
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
protected IOrchardServices OrchardServices { get; set; }
|
||||
protected ISite CurrentSite => OrchardServices.WorkContext.CurrentSite;
|
||||
|
||||
protected abstract string ProductId { get; }
|
||||
protected abstract string LicenseKey { get; }
|
||||
protected virtual bool SkipValidationForLocalRequests => false;
|
||||
|
||||
public void ValidateLicense()
|
||||
{
|
||||
// TODO: Throttle this code by caching its outcome (void or exception) for 5 minutes.
|
||||
|
||||
var licenseVerificationTokenStore = new LicenseVerificationTokenStore(_appDataFolder);
|
||||
var licenseVerificationTokenAccessor = new LicenseVerificationTokenAccessor(licenseVerificationTokenStore);
|
||||
var licenseValidator = new LicenseValidator(licenseVerificationTokenAccessor);
|
||||
|
||||
var options = LicenseValidationOptions.Default;
|
||||
if (SkipValidationForLocalRequests)
|
||||
options = options | LicenseValidationOptions.SkipForLocalRequests;
|
||||
|
||||
licenseValidator.ValidateLicense(ProductId, LicenseKey, options);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user