Skip to content

Instantly share code, notes, and snippets.

@HowardvanRooijen
Created February 26, 2015 11:30
Show Gist options
  • Save HowardvanRooijen/ec023b8f774cc4a97868 to your computer and use it in GitHub Desktop.
Save HowardvanRooijen/ec023b8f774cc4a97868 to your computer and use it in GitHub Desktop.
LicenseValidator's Validate method
public void Validate(IClientLicense clientLicense, ICryptoKey publicKey, IEnumerable<ILicenseValidationRule> validationRules)
{
if (!LicenseSignatureValidator.ValidateSignature(clientLicense, publicKey))
{
throw new InvalidLicenseException(clientLicense);
}
this.LicenseCriteria = this.licenseCriteriaParser.Parse(clientLicense);
validationRules.ForEachFailEnd(x => x.Validate(this.LicenseCriteria));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment