NLog.Layouts.SimpleLayout.ToString C# (CSharp) Méthode

ToString() public méthode

Returns a that represents the current object.
public ToString ( ) : string
Résultat string
        public override string ToString()
        {
            return "'" + this.Text + "'";
        }

Usage Example

        public void SimpleLayoutToStringTest()
        {
            var l = new SimpleLayout("xx${level}yy");
            Assert.Equal("'xx${level}yy'", l.ToString());

            var l2 = new SimpleLayout(new LayoutRenderer[0], "someFakeText", ConfigurationItemFactory.Default);
            Assert.Equal("'someFakeText'", l2.ToString());
        }
All Usage Examples Of NLog.Layouts.SimpleLayout::ToString