예제 #1
0
        public static void EndValidationGlobalStage(this ValidationContext context, ValidationGlobalStage globalStage)
        {
            ValidationGlobalStage validationGlobalStage = GetValidationGlobalStage(context, "__ValidationGlobalStage");
            ValidationGlobalStage newStage = (ValidationGlobalStage)Util.ClearFlag(globalStage, validationGlobalStage);

            context.SetCacheValue("__ValidationGlobalStage", new ValidationGlobalStageImpl(newStage));
        }
예제 #2
0
        public static void BeginValidationGlobalStage(this ValidationContext context, ValidationGlobalStage globalStage)
        {
            ValidationGlobalStage currentStage = GetValidationGlobalStage(context);

            ValidationGlobalStage newStage = (ValidationGlobalStage)Util.SetFlag(globalStage, currentStage);

            context.SetCacheValue("__ValidationGlobalStage", new ValidationGlobalStageImpl(newStage));
        }
예제 #3
0
 public ValidationGlobalStageImpl(ValidationGlobalStage current)
 {
     Current = current;
 }
예제 #4
0
        public static bool IsInGlobalStage(this ValidationContext context, ValidationGlobalStage globalStage)
        {
            ValidationGlobalStage validationGlobalStage = GetValidationGlobalStage(context);

            return(Util.IsFlagSet(globalStage, validationGlobalStage));
        }