Re: [Saxdotnet-devel] "Unifying" the core and extension interfaces
Brought to you by:
jeffrafter,
kwaclaw
From: Karl W. <ka...@wa...> - 2004-12-07 18:26:05
|
> Jeff Rafter wrote: > > > > What we do what to change is the clumsy mechanism for connecting > > extension interfaces to an IXmlReader. Currently this is done through > > the setproperty/getproperty mechanism. We propose to add new interface > > level property for LexicalHandler and DeclHandler (that will behave in > > the same way ContentHandler, ErrorHandler, etc, work). > > > > By "interface level property" do you mean adding > setLexicalHandler/getLexicalHandler and setDeclHandler/getDeclHandler > methods? > > Sorry if this is obvious to the .NET folks. I'm just not fully > conversant with the lingo yet. Sort of. In C#, the get/set pair of accessors is replaced by the syntactical construct of a "property": public interface IXmlReader { ... IContentHandler ContentHandler { get; set; } IDtdHandler DtdHandler { get; set; } ILexicalHandler LexicalHandler { get; set; } IDeclHandler DeclHandler { get; set; } ... } usage: IXmlReader reader; reader.ContentHandler = new MyContentHandler(); reader.LexicalHandler = new MyLexicalHandler(); Karl |