コード例 #1
0
        public void Allowed()
        {
            var policy = new BlackList <string>();

            policy.Add("c");
            policy.Add("d");
            Assert.IsTrue(policy.IsAllowed("a"));
            Assert.IsTrue(policy.IsAllowed("b"));
            Assert.IsFalse(policy.IsAllowed("c"));
            Assert.IsFalse(policy.IsAllowed("d"));
        }
コード例 #2
0
 /// <inheritdoc />
 public bool IsAllowed(MultiAddress target)
 {
     return(BlackList.IsAllowed(target) &&
            WhiteList.IsAllowed(target));
 }
コード例 #3
0
        public void Empty()
        {
            var policy = new BlackList <string>();

            Assert.IsTrue(policy.IsAllowed("a"));
        }