コード例 #1
0
ファイル: Hint.cs プロジェクト: tralivali1234/nitra
        public FrameworkElement ParseToFrameworkElement(string value)
        {
            var root = HintParser.Parse(value);
            var fe   = HintBuilder.Build(root, this);

            return(fe);
        }
コード例 #2
0
        public void CanParseHintWithColonInValue()
        {
            var input = new HashSet <string> {
                "sql-command-timeout: 00:00:30"
            };

            var hints = HintParser.ParseHints(input);

            Assert.That(hints.Count, Is.EqualTo(1));
            Assert.That(hints.First().Value, Is.EqualTo("00:00:30"));
        }
コード例 #3
0
        public void TryParsingHints()
        {
            var input = new HashSet <string> {
                "sql-command-timeout: 30s"
            };

            var hints = HintParser.ParseHints(input);

            Hint hint = hints.GetHint("sql-command-timeout");

            Assert.That(hint, Is.Not.Null);
            Assert.That(hint.Value, Is.EqualTo("30s"));
        }