/// <summary> /// Ergänzt eine weitere Zeile. /// </summary> /// <param name="line">Die gewünschte Zeile.</param> /// <returns>Gesetzt, wenn weitere Zeilen aufgenommen werden können.</returns> public override bool Extend( string line ) { // Create factory if (m_factory == null) { // Fallback m_factory = new PassThroughLine(); // Remember m_sections.Add( m_factory ); } // Eat up if (m_factory.Extend( line )) return true; // Reset m_factory = null; // Check for full end - actually a bit of misuse of our factory pattern but who cares return !EndPattern.IsMatch( line ); }
/// <summary> /// Ergänzt eine weitere Zeile. /// </summary> /// <param name="line">Die gewünschte Zeile.</param> /// <returns>Gesetzt, wenn weitere Zeilen aufgenommen werden können.</returns> public override bool Extend( string line ) { // Create factory if (m_factory == null) { // Check mode var match = ProjectDependenciesSection.StartPattern.Match( line ); if (match.Success) { // Create new m_factory = new ProjectDependenciesSection( match ); } else { // Fallback m_factory = new PassThroughLine(); } // Remember m_sections.Add( m_factory ); } // Eat up if (m_factory.Extend( line )) return true; // Reset m_factory = null; // Check for full end - actually a bit of misuse of our factory pattern but who cares return !EndPattern.IsMatch( line ); }