Esempio n. 1
0
 public override void OnActionExecuting(ActionExecutingContext actionContext)
 {
     if (!FeaturesUtility.GlobalModuleExists(_moduleName))
     {
         throw new FeatureNotFoundException(_displayName ?? _moduleName);
     }
 }
Esempio n. 2
0
 public override void OnActionExecuting(ActionExecutingContext actionContext)
 {
     if (_require)
     {
         if (!FeaturesUtility.HasAnyGlobalModule())
         {
             throw new FeatureNotFoundException(NAME);
         }
     }
     else
     {
         if (FeaturesUtility.HasAnyGlobalModule())
         {
             throw new AlreadyExistsException(NAME);
         }
     }
 }