Exemple #1
0
        public bool IsValidTarget(MemberData.TargetType targetType)
        {
            bool flag  = ValidTargetType != MemberData.TargetType.None;
            bool flag2 = InvalidTargetType != MemberData.TargetType.None;

            if (flag || flag2)
            {
                if (flag2 && InvalidTargetType.HasFlags(targetType))
                {
                    return(false);
                }
                if (flag && !ValidTargetType.HasFlags(targetType))
                {
                    return(false);
                }
            }
            return(true);
        }
Exemple #2
0
 public FilterAttribute(FilterAttribute other)
 {
     if (other == null)
     {
         return;
     }
     this.CanSelectType            = other.CanSelectType;
     this.DisplayDefaultStaticType = other.DisplayDefaultStaticType;
     this.DisplayGenericType       = other.DisplayGenericType;
     this.DisplayInstanceOnStatic  = other.DisplayInstanceOnStatic;
     this.HideSubClassType         = other.HideSubClassType;
     this.HideTypes          = new List <Type>(other.HideTypes);
     this.Inherited          = other.Inherited;
     this.Instance           = other.Instance;
     this.MaxMethodParam     = other.MaxMethodParam;
     this.MinMethodParam     = other.MinMethodParam;
     this.NestedType         = other.NestedType;
     this.NonPublic          = other.NonPublic;
     this.OnlyArrayType      = other.OnlyArrayType;
     this.UnityReference     = other.UnityReference;
     this.DisplayRuntimeType = other.DisplayRuntimeType;
     this.OnlyGenericType    = other.OnlyGenericType;
     this.OnlyGetType        = other.OnlyGetType;
     this.Public             = other.Public;
     this.SetMember          = other.SetMember;
     this.Static             = other.Static;
     this.Types                = new List <Type>(other.Types);
     this.ValidMemberType      = other.ValidMemberType;
     this.ValidNextMemberTypes = other.ValidNextMemberTypes;
     this.ArrayManipulator     = other.ArrayManipulator;
     this.SelectBaseType       = other.SelectBaseType;
     this.boxing               = other.boxing;
     this.DisplayInterfaceType = other.DisplayInterfaceType;
     this.DisplayValueType     = other.DisplayValueType;
     this.DisplayReferenceType = other.DisplayReferenceType;
     this.DisplaySealedType    = other.DisplaySealedType;
     this.DisplayAbstractType  = other.DisplayAbstractType;
     this.DisplayNativeType    = other.DisplayNativeType;
     this.attributeTargets     = other.attributeTargets;
     this.ValidTargetType      = other.ValidTargetType;
     this.InvalidTargetType    = other.InvalidTargetType;
     this.VoidType             = other.VoidType;
     this.AllowInterface       = other.AllowInterface;
 }