Exemplo n.º 1
0
        public object Invoke(XsltContext xsltContext, object[] args, XPathNavigator docContext)
        {
            var text  = ((XPathNodeIterator)args[0]).Current.Value;
            var codes = new CodeList(text);

            return(codes.Contains((string)args[1]));
        }
Exemplo n.º 2
0
        public void Contains()
        {
            var codes = new CodeList(" Latn   Hans~t  \r\n  Jpan ");

            Assert.IsTrue(codes.Contains("Latn"));
            Assert.IsTrue(codes.Contains("Hans"));
            Assert.IsTrue(codes.Contains("Hant"));
            Assert.IsTrue(codes.Contains("Jpan"));
            Assert.IsFalse(codes.Contains("Hung"));
            Assert.IsFalse(codes.Contains("Hanr"));
        }