Example #1
0
 public void DenyTest(string str, LimitKind limitKind, string target, bool isAllow)
 {
     var allow = new Dat(new[] { CtrlType.TextBox, CtrlType.Int });
     var deny = new Dat(new[] { CtrlType.TextBox, CtrlType.Int });
     deny = AddDat(deny, limitKind, str);
     LimitUrl limitUrl = new LimitUrl(allow, deny);
     var errorStr = "";
     Assert.AreEqual(limitUrl.IsAllow(target, ref errorStr), isAllow);
 }
Example #2
0
        public void DenyTest(string str, LimitKind limitKind, string target, bool isAllow)
        {
            var allow = new Dat(new[] { CtrlType.TextBox, CtrlType.Int });
            var deny  = new Dat(new[] { CtrlType.TextBox, CtrlType.Int });

            deny = AddDat(deny, limitKind, str);
            LimitUrl limitUrl = new LimitUrl(allow, deny);
            var      errorStr = "";

            Assert.AreEqual(limitUrl.IsAllow(target, ref errorStr), isAllow);
        }
Example #3
0
 Dat AddDat(Dat dat, LimitKind limitKind, string url)
 {
     dat.Add(true, string.Format("{0}\t{1}", url, (int)limitKind));
     return(dat);
 }
Example #4
0
 Dat AddDat(Dat dat, LimitKind limitKind, string url)
 {
     dat.Add(true, string.Format("{0}\t{1}",url,(int)limitKind));
     return dat;
 }
Example #5
0
 public PublicLimits(LimitKind kind, int limitValue)
 {
     Kind       = kind;
     LimitValue = limitValue;
 }