public static TargetingInfo FromExcludeAny(TargetingTypes ExcludeAny)
        {
            TargetingInfo rv = new TargetingInfo();

            rv.ExcludeAny = ExcludeAny;
            return(rv);
        }
        public static TargetingInfo FromRequireAny(TargetingTypes RequireAny)
        {
            TargetingInfo rv = new TargetingInfo();

            rv.RequireAny = RequireAny;
            return(rv);
        }
        public static TargetingInfo FromRequireAll(TargetingTypes RequireAll)
        {
            TargetingInfo rv = new TargetingInfo();

            rv.RequireAll = RequireAll;
            return(rv);
        }
 public TargetingInfo(TargetingTypes RequireAny)
 {
     this.RequireAny = RequireAny;
     this.RequireAll = TargetingTypes.None;
     this.ExcludeAny = TargetingTypes.None;
     this.isValid    = true;
 }
 public TargetingInfo(TargetingTypes RequireAny, TargetingTypes RequireAll, TargetingTypes ExcludeAny)
 {
     this.RequireAny = RequireAny;
     this.RequireAll = RequireAll;
     this.ExcludeAny = ExcludeAny;
     this.isValid    = true;
 }
 public bool MeetsRequirements(TargetingTypes targetingTypes)
 {
     return
         (((ExcludeAny & targetingTypes) == TargetingTypes.None) &&
          ((RequireAll & targetingTypes) == RequireAll) &&
          ((RequireAny == TargetingTypes.None) ||
           ((RequireAny & targetingTypes) != TargetingTypes.None)));
 }