コード例 #1
0
        private void BuildFinisedEvent(SolutionEventsListener sender, System.EventArgs e)
        {
            if (!IsActive)
            {
                return;
            }

            var args = e as SolutionBuildFinishedEvent;

            var handler = new ParserHandler(string.Empty)
            {
                Model = this, Folder = args.ProjectFolder
            };

            handler.Parse();
        }
コード例 #2
0
        public void Test_BracketParser_EnglishFirst_WithMultipleBibleVerses()
        {
            var input = new[]
            {
                "【宣告/Proclaim】《詩篇/Psalm 50:23》;《希伯來書/Hebrew 13:15b》"
            };
            var element = _parserHandler.Parse(input).FirstOrDefault();

            Assert.NotNull(element);
            Assert.Equal(input.First(), element.Input);
            Assert.True(element.Pass);
            Assert.Equal(2, element.Verses.Count());
            Assert.Equal(ElementType.Title, element.ElementType);
            Assert.Equal($"Proclaim{Environment.NewLine}Psalm 50:23{Environment.NewLine}Hebrew 13:15b", element.Verses.First().Content);
            Assert.Equal(Language.English, element.Verses.First().Language);
            Assert.Equal($"宣告{Environment.NewLine}詩篇 50:23{Environment.NewLine}希伯來書 13:15b", element.Verses.Last().Content);
            Assert.Equal(Language.Chinese, element.Verses.Last().Language);
        }