Пример #1
0
		private void LicenseValidatorOnLicenseInvalidated(InvalidationType invalidationType)
		{
			var document = docDb.Get("Raven/WarningMessages", null);
			WarningMessagesHolder messagesHolder = document == null ?
				new WarningMessagesHolder() :
				document.DataAsJson.JsonDeserialization<WarningMessagesHolder>();

			if (messagesHolder.Messages.Any(warnMsg => warnMsg.StartsWith("Licensing:")) == false)
			{
				messagesHolder.Messages.Add("Licensing: RavenDB license has expired at " +
					licenseValidator.ExpirationDate.ToShortDateString());
			}
			docDb.Put("Raven/WarningMessages", null,
						 JObject.FromObject(messagesHolder), 
						 new JObject(), null);
		}
Пример #2
0
		private void OnLicenseInvalidated(InvalidationType invalidationType)
		{
			logger.Error("The license have expired and can no longer be used");
			CurrentLicense = new LicensingStatus
			{
				Status = "AGPL - Open Source",
				Error = true,
				Message = "License expired"
			};
		}
 public ValidationException(InvalidationType type, string message) : base(message)
 {
     invalid = type;
 }