예제 #1
0
        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;
        }
예제 #2
0
        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;
        }