Example #1
0
        internal ABProviderCapabilities(ABProviderFlags flags)
        {
            if ((flags & (ABProviderFlags.HasGal | ABProviderFlags.CanBrowse)) != flags)
            {
                throw new ArgumentOutOfRangeException("Got an unknown flag", "flags");
            }
            bool flag  = (flags & ABProviderFlags.CanBrowse) != ABProviderFlags.None;
            bool flag2 = (flags & ABProviderFlags.HasGal) != ABProviderFlags.None;

            if (flag && !flag2)
            {
                throw new ArgumentException("Unsupported combination: canBrowse && !hasGal", "flags");
            }
            this.flags = flags;
        }
Example #2
0
 private bool CheckFlags(ABProviderFlags flags)
 {
     return((this.flags & flags) == flags);
 }