Пример #1
0
        /// <summary>
        /// Verify that the specified row of the chart exists and has the expected property values.
        /// </summary>
        /// <param name="index">row index</param>
        /// <param name="ct">ClauseType</param>
        /// <param name="ep">EndParagraph</param>
        /// <param name="es">EndSentence</param>
        /// <param name="sdcg">StartDependentClauseGroup</param>
        /// <param name="edcg">EndDependentClauseGroup</param>
        internal void VerifyRowDetails(int index, ClauseTypes ct, bool ep, bool es, bool sdcg, bool edcg)
        {
            var crows = m_chart.RowsOS.Count;

            Assert.IsTrue(index < crows, "Invalid row index.");
            var row = m_chart.RowsOS[index];

            Assert.IsNotNull(row, "Invalid Row object!");
            Assert.AreEqual(ep, row.EndParagraph, "EndParagraph property is wrong");
            Assert.AreEqual(es, row.EndSentence, "EndSentence property is wrong");
            Assert.AreEqual(sdcg, row.StartDependentClauseGroup, "StartDependentClauseGroup property is wrong");
            Assert.AreEqual(edcg, row.EndDependentClauseGroup, "EndDependentClauseGroup property is wrong");
        }
Пример #2
0
		/// <summary>
		/// Verify that the specified row of the chart exists and has the expected property values.
		/// </summary>
		/// <param name="index">row index</param>
		/// <param name="ct">ClauseType</param>
		/// <param name="ep">EndParagraph</param>
		/// <param name="es">EndSentence</param>
		/// <param name="sdcg">StartDependentClauseGroup</param>
		/// <param name="edcg">EndDependentClauseGroup</param>
		void VerifyRowDetails(int index, ClauseTypes ct, bool ep, bool es, bool sdcg, bool edcg)
		{
			m_helper.VerifyRowDetails(index, ct, ep, es, sdcg, edcg);
		}
Пример #3
0
 public AfterClauseCreateEventArgs(SqlTypes sqlType, ClauseTypes clauseType, StringBuilder clause)
 {
     SqlType    = sqlType;
     ClauseType = clauseType;
     SqlClause  = clause;
 }
Пример #4
0
        /// <summary>
        /// Make a dependent clause marker at the end of the specified row in the specified column
        /// for the specified clauses (rows) of the specified type. Caller supplies a marker.
        /// </summary>
        /// <param name="row"></param>
        /// <param name="icol"></param>
        /// <param name="depClauses"></param>
        /// <param name="depType"></param>
        /// <returns></returns>
        internal IConstChartClauseMarker MakeDependentClauseMarker(IConstChartRow row, int icol,
                                                                   IConstChartRow[] depClauses, ClauseTypes depType)
        {
            Assert.IsTrue(depType == ClauseTypes.Dependent ||
                          depType == ClauseTypes.Song ||
                          depType == ClauseTypes.Speech, "Invalid dependent type.");

            // Set ClauseType and begin/end group booleans in destination clauses
            foreach (var rowDst in depClauses)
            {
                rowDst.ClauseType = depType;
                if (rowDst == depClauses[0])
                {
                    rowDst.StartDependentClauseGroup = true;
                }
                if (rowDst == depClauses[depClauses.Length - 1])
                {
                    rowDst.EndDependentClauseGroup = true;
                }
            }

            // Create marker
            Assert.Less(icol, m_allColumns.Count, "Invalid column index");
            return(m_clauseMrkrFact.Create(row, row.CellsOS.Count, m_allColumns[icol], depClauses));
        }
Пример #5
0
 public BeforeClauseCreateEventArgs(SqlTypes queryType, ClauseTypes clauseType, StringBuilder clause)
 {
     SqlType    = queryType;
     ClauseType = clauseType;
     SqlClause  = clause;
 }