예제 #1
0
        /// <summary>
        ///     <para>Writes the specified <see cref="XcfSection"/> to the buffer</para>
        /// </summary>
        /// <param name="section"></param>
        public void WriteSection(XcfSection section)
        {
            WriteOpenSection(section.Name);

            foreach (XcfKey item in section.Keys)
            {
                WriteKey(item);
            }

            foreach (XcfSection item in section.Children)
            {
                WriteSection(item);
            }

            WriteCloseSection();
        }
        public void TestMethod1()
        {
            XcfBuilder builder = new XcfBuilder();

            for (Int32 i = 0; i < 25; ++i)
            {
                XcfSection section = new XcfSection(String.Format("Section{0}", i));

                for (Int32 x = 0; x < 1000; ++x)
                {
                    section.AddKey(String.Format("item{0}", x), x);
                }

                Assert.AreEqual(1000, section.Keys.Count);
                builder.WriteSection(section);
            }
        }
예제 #3
0
        /// <summary>
        ///     <para>Writes the specified <see cref="XcfSection"/> to the buffer</para>
        /// </summary>
        /// <param name="section"></param>
        public void WriteSection(XcfSection section)
        {
            WriteOpenSection(section.Name);

            foreach (XcfKey item in section.Keys)
            {
                WriteKey(item);
            }

            foreach (XcfSection item in section.Children)
            {
                WriteSection(item);
            }

            WriteCloseSection();
        }