public iCalendarCollection ParseStream(TextReader reader) { iCalSimpleParser sParser = new iCalSimpleParser(); sParser.ComponentStart += this.ComponentStartHandler; sParser.ComponentEnd += this.ComponentEndHandler; sParser.Property += this.PropertyHandler; this.Collection = new iCalendarCollection(); this.Current = this.Collection; this.Parent = null; this.factory = new iCalComponentFactory(); sParser.ParseStream( reader ); return this.Collection; }
public iCalendarCollection ParseFile( String filename ) { iCalSimpleParser sParser = new iCalSimpleParser(); sParser.ComponentStart += this.ComponentStartHandler; sParser.ComponentEnd += this.ComponentEndHandler; sParser.Property += this.PropertyHandler; this.Collection = new iCalendarCollection(); this.Current = this.Collection; this.Parent = null; this.factory = new iCalComponentFactory(); sParser.ParseFile( filename ); return this.Collection; }