GetCommentDelimiters() публичный Метод

public GetCommentDelimiters ( ) : char[]
Результат char[]
Пример #1
0
        public void GetAndSetDelimiters()
        {
            StringWriter writer = new StringWriter();

            writer.WriteLine("[Test]");
            writer.WriteLine(" option = someValue ; some comment");

            IniReader reader = new IniReader
                                   (new StringReader(writer.ToString()));

            Assert.AreEqual('=', reader.GetAssignDelimiters()[0]);
            reader.SetAssignDelimiters(new char[] { ':', '=' });
            Assert.AreEqual(':', reader.GetAssignDelimiters()[0]);
            Assert.AreEqual('=', reader.GetAssignDelimiters()[1]);

            Assert.AreEqual(';', reader.GetCommentDelimiters()[0]);
            reader.SetCommentDelimiters(new char[] { '#', ';' });
            Assert.AreEqual('#', reader.GetCommentDelimiters()[0]);
            Assert.AreEqual(';', reader.GetCommentDelimiters()[1]);
        }
Пример #2
0
        public void GetAndSetDelimiters() {
            StringWriter writer = new StringWriter();
            writer.WriteLine("[Test]");
            writer.WriteLine(" option = someValue ; some comment");

            IniReader reader = new IniReader
                (new StringReader(writer.ToString()));

            Assert.AreEqual('=', reader.GetAssignDelimiters()[0]);
            reader.SetAssignDelimiters(new char[] { ':', '=' });
            Assert.AreEqual(':', reader.GetAssignDelimiters()[0]);
            Assert.AreEqual('=', reader.GetAssignDelimiters()[1]);

            Assert.AreEqual(';', reader.GetCommentDelimiters()[0]);
            reader.SetCommentDelimiters(new char[] { '#', ';' });
            Assert.AreEqual('#', reader.GetCommentDelimiters()[0]);
            Assert.AreEqual(';', reader.GetCommentDelimiters()[1]);
        }