Ejemplo n.º 1
0
 /// <summary>
 /// Validate the arguments
 /// </summary>
 /// <param name="current"></param>
 /// <param name="main"></param>
 /// <returns></returns>
 bool IArgumentsProvider <T> .Validate(T current, MainArguments main)
 {
     if (main.Renew)
     {
         if (_typedThis.Active(current))
         {
             Log?.Error($"Renewal {(string.IsNullOrEmpty(_typedThis.Group) ? "" : $"{_typedThis.Group} ")}parameters cannot be changed during a renewal. Recreate/overwrite the renewal or edit the .json file if you want to make changes.");
             return(false);
         }
     }
Ejemplo n.º 2
0
 public virtual bool Validate(ILogService log, T current, MainArguments main)
 {
     if (main.Renew)
     {
         if (IsActive(current))
         {
             log.Error($"Renewal {(string.IsNullOrEmpty(Group)?"":$"{Group} ")}parameters cannot be changed during a renewal. Recreate/overwrite the renewal or edit the .json file if you want to make changes.");
             return(false);
         }
     }
Ejemplo n.º 3
0
 /// <summary>
 /// Validate the arguments
 /// </summary>
 /// <param name="current"></param>
 /// <param name="main"></param>
 /// <returns></returns>
 bool IArgumentsProvider <T> .Validate(T current, MainArguments main, string[] args)
 {
     if (main.Renew)
     {
         if (_typedThis.Active(current, args))
         {
             Log?.Error($"Renewal {(string.IsNullOrEmpty(_typedThis.Group) ? "" : $"{_typedThis.Group} ")}parameters cannot be changed during --renew. Edit the renewal using the renewal manager or recreate the existing one to make changes.");
             return(false);
         }
     }
Ejemplo n.º 4
0
        public virtual bool Validate(ILogService log, T current, MainArguments main)
        {
            var active = Active(current);

            if (main.Renew && active)
            {
                log.Error($"{Group} parameters cannot be changed during a renewal. Recreate/overwrite the renewal or edit the .json file if you want to make changes.");
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 5
0
 bool IArgumentsProvider.Validate(ILogService log, object current, MainArguments main) => Validate(log, (T)current, main);