コード例 #1
0
ファイル: ThreadAgnosticTests.cs プロジェクト: zuohu/NLog
        public void NonThreadAgnosticTest()
        {
            Layout l = new SimpleLayout("${threadname}");

            l.Initialize(null);
            Assert.False(l.ThreadAgnostic);
        }
コード例 #2
0
ファイル: ThreadAgnosticTests.cs プロジェクト: zuohu/NLog
        public void ThreadAgnosticTest()
        {
            Layout l = new SimpleLayout("${message}");

            l.Initialize(null);
            Assert.True(l.ThreadAgnostic);
        }
コード例 #3
0
ファイル: ThreadAgnosticTests.cs プロジェクト: zuohu/NLog
        public void TripleWrapperOverNonAgnostic()
        {
            Layout l = new SimpleLayout("${uppercase:${lowercase:${rot13:${message}${threadname}}}}");

            l.Initialize(null);
            Assert.False(l.ThreadAgnostic);
        }
コード例 #4
0
        public void TripleWrapperOverAgnostic()
        {
            Layout l = new SimpleLayout("${uppercase:${lowercase:${rot13:${message}}}}");

            l.Initialize(null);
            Assert.True(l.IsThreadAgnostic);
        }
コード例 #5
0
ファイル: ThreadAgnosticTests.cs プロジェクト: zuohu/NLog
        public void CustomAgnosticTests()
        {
            var cif = new ConfigurationItemFactory();

            cif.RegisterType(typeof(CustomRendererAgnostic), string.Empty);

            Layout l = new SimpleLayout("${customAgnostic}", cif);

            l.Initialize(null);
            Assert.True(l.ThreadAgnostic);
        }