1 //------------------------------------------------------------------------------
2 // <copyright file="_Events.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
8 namespace System.Xml.Serialization {
12 using System.Collections;
13 using System.ComponentModel;
15 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventHandler"]/*' />
17 /// <para>[To be supplied.]</para>
19 public delegate void XmlAttributeEventHandler(object sender, XmlAttributeEventArgs e);
21 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs"]/*' />
23 /// <para>[To be supplied.]</para>
25 public class XmlAttributeEventArgs : EventArgs {
33 internal XmlAttributeEventArgs(XmlAttribute attr, int lineNumber, int linePosition, object o, string qnames) {
37 this.lineNumber = lineNumber;
38 this.linePosition = linePosition;
42 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.ObjectBeingDeserialized"]/*' />
44 /// <para>[To be supplied.]</para>
46 public object ObjectBeingDeserialized {
50 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.Attr"]/*' />
52 /// <para>[To be supplied.]</para>
54 public XmlAttribute Attr {
58 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.LineNumber"]/*' />
61 /// Gets the current line number.
64 public int LineNumber {
65 get { return lineNumber; }
68 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.LinePosition"]/*' />
71 /// Gets the current line position.
74 public int LinePosition {
75 get { return linePosition; }
78 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.Attributes"]/*' />
81 /// List the qnames of attributes expected in the current context.
84 public string ExpectedAttributes {
85 get { return qnames == null ? string.Empty : qnames; }
89 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventHandler"]/*' />
90 public delegate void XmlElementEventHandler(object sender, XmlElementEventArgs e);
92 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs"]/*' />
93 public class XmlElementEventArgs : EventArgs {
100 internal XmlElementEventArgs(XmlElement elem, int lineNumber, int linePosition, object o, string qnames) {
103 this.qnames = qnames;
104 this.lineNumber = lineNumber;
105 this.linePosition = linePosition;
108 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.ObjectBeingDeserialized"]/*' />
109 public object ObjectBeingDeserialized {
113 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.Attr"]/*' />
114 public XmlElement Element {
118 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.LineNumber"]/*' />
119 public int LineNumber {
120 get { return lineNumber; }
123 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.LinePosition"]/*' />
124 public int LinePosition {
125 get { return linePosition; }
128 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.ExpectedElements"]/*' />
131 /// List of qnames of elements expected in the current context.
134 public string ExpectedElements {
135 get { return qnames == null ? string.Empty : qnames; }
139 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventHandler"]/*' />
141 /// <para>[To be supplied.]</para>
143 public delegate void XmlNodeEventHandler(object sender, XmlNodeEventArgs e);
145 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs"]/*' />
147 /// <para>[To be supplied.]</para>
149 public class XmlNodeEventArgs : EventArgs {
156 internal XmlNodeEventArgs(XmlNode xmlNode, int lineNumber, int linePosition, object o) {
158 this.xmlNode = xmlNode;
159 this.lineNumber = lineNumber;
160 this.linePosition = linePosition;
163 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.ObjectBeingDeserialized"]/*' />
165 /// <para>[To be supplied.]</para>
167 public object ObjectBeingDeserialized {
172 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.NodeType"]/*' />
174 /// <para>[To be supplied.]</para>
176 public XmlNodeType NodeType {
177 get { return xmlNode.NodeType; }
180 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.Name"]/*' />
182 /// <para>[To be supplied.]</para>
185 get { return xmlNode.Name; }
188 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LocalName"]/*' />
190 /// <para>[To be supplied.]</para>
192 public string LocalName {
193 get { return xmlNode.LocalName; }
196 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.NamespaceURI"]/*' />
198 /// <para>[To be supplied.]</para>
200 public string NamespaceURI {
201 get { return xmlNode.NamespaceURI; }
204 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.Text"]/*' />
206 /// <para>[To be supplied.]</para>
209 get { return xmlNode.Value; }
212 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LineNumber"]/*' />
215 /// Gets the current line number.
218 public int LineNumber {
219 get { return lineNumber; }
222 /// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LinePosition"]/*' />
225 /// Gets the current line position.
228 public int LinePosition {
229 get { return linePosition; }
233 /// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventHandler"]/*' />
234 public delegate void UnreferencedObjectEventHandler(object sender, UnreferencedObjectEventArgs e);
236 /// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs"]/*' />
237 public class UnreferencedObjectEventArgs : EventArgs {
241 /// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedObjectEventArgs"]/*' />
242 public UnreferencedObjectEventArgs(object o, string id) {
247 /// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedObject"]/*' />
248 public object UnreferencedObject {
252 /// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedId"]/*' />
253 public string UnreferencedId {