EnsureLevelExists() 공개 메소드

Ensures that the specified number of levels exists.
public EnsureLevelExists ( int level ) : void
level int
리턴 void
예제 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes and returns a new instance of the <see cref="QuotationMarksList"/> class.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public static QuotationMarksList NewList()
        {
            QuotationMarksList list = new QuotationMarksList();

            list.EnsureLevelExists(2);
            return(list);
        }
예제 #2
0
		public void RunBeforeEachTest()
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.QMarksList[0].Opening = "<<";
			m_qmarks.QMarksList[0].Closing = ">>";
			m_qmarks.QMarksList[1].Opening = "<";
			m_qmarks.QMarksList[1].Closing = ">";
			m_qmarks.EnsureLevelExists(5);
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}
예제 #3
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes and returns a new instance of the <see cref="T:QuotationMarksList"/> class.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public static QuotationMarksList NewList()
		{
			QuotationMarksList list = new QuotationMarksList();
			list.EnsureLevelExists(2);
			return list;
		}
예제 #4
0
		void SetupEnglish4()
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(4);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.QMarksList[2].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[2].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[3].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[3].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.ContinuationType = ParagraphContinuationType.None;
			m_qmarks.ContinuationMark = ParagraphContinuationMark.None;
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}
예제 #5
0
		void SetupEnglish3() // TO DO: Is there a way to limit it?
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(3);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_qmarks.QMarksList[2].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[2].Closing = "\u201D"; // Right double quotation mark
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}
예제 #6
0
		void SetupEnglish2()
		{
			m_qmarks = QuotationMarksList.NewList();
			m_qmarks.EnsureLevelExists(2);
			m_qmarks.QMarksList[0].Opening = "\u201C"; // Left double quotation mark
			m_qmarks.QMarksList[0].Closing = "\u201D"; // Right double quotation mark
			m_qmarks.QMarksList[1].Opening = "\u2018"; // Left single quotation mark
			m_qmarks.QMarksList[1].Closing = "\u2019"; // Right single quotation mark
			m_source.SetParameterValue("QuotationMarkInfo", m_qmarks.XmlString);
		}
예제 #7
0
 public void TestDistinctLevels_3Levels_repeated1()
 {
     m_qmList.EnsureLevelExists(3);
     m_qmList[0].Opening = "<<";
     m_qmList[0].Closing = ">>";
     m_qmList[1].Opening = "<";
     m_qmList[1].Closing = ">";
     m_qmList[2].Opening = "<<";
     m_qmList[2].Closing = ">>";
     Assert.AreEqual(2, m_qmList.DistinctLevels);
 }