Removed merge conflict artifacts.

This commit is contained in:
Sipke Schoorstra
2015-06-15 13:48:57 +03:00
parent f9cf0b7fef
commit d3249afaca
5 changed files with 0 additions and 157 deletions

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}
}