public void ParseFile( String filename ) { iCalReader icalReader = new iCalReader( filename ); this.Parse( icalReader ); }
public void ParseStream( TextReader reader ) { iCalReader icalReader = new iCalReader( reader ); this.Parse( icalReader ); }
protected void Parse( iCalReader reader ) { iCalLineContent content = null; while( ( content = reader.ReadContent() ) != null ){ iCalParserEventArgs args = new iCalParserEventArgs( content ); if( content.Name == "begin" ){ String value = content.Value.ToLower(); if( this.ComponentStart != null ){ this.ComponentStart( this, args ); } } else if( content.Name == "end" ) { String value = content.Value.ToLower(); if( this.ComponentEnd != null ){ this.ComponentEnd( this, args ); } } else { if( this.Property != null ){ this.Property( this, args ); } } } }