예제 #1
0
 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;
 }
예제 #2
0
        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;
        }
예제 #3
0
 public void PropertyHandler ( Object sender, iCalParserEventArgs args )
 {
     iCalLineContent content = args.Content;
     this.Current.SetProperty( content );
 }
예제 #4
0
        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 );
                    }
                }
            }
        }