public void ComponentEndHandler( Object sender, iCalParserEventArgs args ) { if( this.Parent != null ){ this.Parent.AddChild( this.Current ); } this.Current = this.Current.Parent; this.Parent = this.Current.Parent; }
public void ComponentStartHandler( Object sender, iCalParserEventArgs args ) { iCalLineContent content = args.Content; this.Parent = this.Current; this.Current = factory.Create( content.Value ); this.Current.Parent = this.Parent; }
public void PropertyHandler ( Object sender, iCalParserEventArgs args ) { iCalLineContent content = args.Content; this.Current.SetProperty( content ); }
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 ); } } } }