/// <summary> /// Is activate, This method is only applicable to 'Verify'. /// </summary> /// <param name="context"></param> /// <param name="value"></param> /// <returns></returns> protected bool IsActivate(VerifiableObjectContext context, object value) { if (WithActivationConditions && ActivationConditions3 is not null) { return(ActivationConditions3.Invoke(context.Instance, value)); } if (WithActivationConditions && ActivationConditions2 is not null) { return(ActivationConditions2.Invoke(value)); } return(true); }
/// <summary> /// Is activate, This method is only applicable to 'Verify'. /// </summary> /// <param name="context"></param> /// <param name="value"></param> /// <returns></returns> protected bool IsActivate(VerifiableMemberContext context, object value) { if (WithActivationConditions && ActivationConditions3 is not null && context.HasParentContext()) { return(ActivationConditions3.Invoke(context.GetParentInstance(), value)); } if (WithActivationConditions && ActivationConditions2 is not null) { return(ActivationConditions2.Invoke(value)); } return(true); }