12 internal class TypeEntry
16 internal string typeNs;
18 internal string typeName;
27 private int tempNamespacePrefix;
33 private string idBase;
43 private string aliasBase =
"q";
47 private bool escapeName =
true;
84 if (namespaces !=
null)
86 return namespaces.NamespaceList;
105 this.namespaces = namespaces;
106 soap12 = (encodingStyle ==
"http://www.w3.org/2003/05/soap-encoding");
107 this.idBase = idBase;
124 return DynamicAssemblies.Get(assemblyFullName);
132 return XmlCustomFormatter.FromByteArrayHex(value);
140 return XmlCustomFormatter.FromDateTime(value);
148 return XmlCustomFormatter.FromDate(value);
156 return XmlCustomFormatter.FromTime(value);
164 return XmlCustomFormatter.FromChar(value);
172 protected static string FromEnum(
long value,
string[] values,
long[] ids)
174 return XmlCustomFormatter.FromEnum(value, values, ids,
null);
183 protected static string FromEnum(
long value,
string[] values,
long[] ids,
string typeName)
185 return XmlCustomFormatter.FromEnum(value, values, ids, typeName);
193 return XmlCustomFormatter.FromXmlName(name);
201 return XmlCustomFormatter.FromXmlNCName(ncName);
209 return XmlCustomFormatter.FromXmlNmToken(nmToken);
217 return XmlCustomFormatter.FromXmlNmTokens(nmTokens);
225 WriteAttribute(
"type",
"http://www.w3.org/2001/XMLSchema-instance", GetQualifiedName(name, ns));
230 return GetPrimitiveTypeName(type, throwIfUnknown:
true);
235 XmlQualifiedName primitiveTypeNameInternal = GetPrimitiveTypeNameInternal(type);
236 if (throwIfUnknown && primitiveTypeNameInternal ==
null)
240 return primitiveTypeNameInternal;
243 internal static XmlQualifiedName GetPrimitiveTypeNameInternal(Type type)
245 string ns =
"http://www.w3.org/2001/XMLSchema";
247 switch (Type.GetTypeCode(type))
277 name =
"unsignedByte";
283 name =
"unsignedShort";
286 name =
"unsignedInt";
289 name =
"unsignedLong";
293 ns =
"http://microsoft.com/wsdl/types/";
296 if (type == typeof(XmlQualifiedName))
301 if (type == typeof(
byte[]))
303 name =
"base64Binary";
311 if (type == typeof(Guid))
314 ns =
"http://microsoft.com/wsdl/types/";
317 if (type == typeof(XmlNode[]))
324 return new XmlQualifiedName(name, ns);
336 string ns2 =
"http://www.w3.org/2001/XMLSchema";
384 ns2 =
"http://microsoft.com/wsdl/types/";
388 text2 =
"unsignedByte";
396 text2 =
"unsignedShort";
400 text2 =
"unsignedInt";
404 text2 =
"unsignedLong";
422 if (type == typeof(
byte[]))
426 text2 =
"base64Binary";
429 if (type == typeof(
Guid))
433 ns2 =
"http://microsoft.com/wsdl/types/";
442 if (typeof(
XmlNode[]).IsAssignableFrom(type))
453 for (
int i = 0; i < array.Length; i++)
455 if (array[i] !=
null)
486 XmlCustomFormatter.WriteArrayBase64(w, (
byte[])o, 0, ((
byte[])o).Length);
499 private string GetQualifiedName(
string name,
string ns)
501 if (ns ==
null || ns.Length == 0)
508 if (ns ==
"http://www.w3.org/XML/1998/namespace")
518 else if (text.Length == 0)
522 return text +
":" + name;
540 if (xmlQualifiedName ==
null)
544 if (xmlQualifiedName.
IsEmpty && ignoreEmpty)
605 if (o !=
null && objectsInUse !=
null)
611 objectsInUse.
Add(o, o);
615 if (namespaces !=
null)
617 foreach (
string key
in namespaces.Namespaces.
Keys)
619 string text3 = (string)namespaces.Namespaces[key];
620 if (key.Length > 0 && text3 == ns)
626 if (text3 ==
null || text3.Length == 0)
632 writePrefixed =
true;
636 usedPrefixes = ListUsedPrefixes(namespaces.Namespaces, aliasBase);
638 if (writePrefixed && text ==
null && ns !=
null && ns.Length > 0)
641 if (text ==
null || text.Length == 0)
646 if (text ==
null && xmlns !=
null)
648 text = xmlns.LookupPrefix(ns);
650 if (flag && text ==
null && ns !=
null && ns.Length != 0)
655 if (namespaces !=
null)
657 foreach (
string key2
in namespaces.Namespaces.
Keys)
659 string text5 = (string)namespaces.Namespaces[key2];
660 if (key2.Length != 0 || (text5 !=
null && text5.Length != 0))
662 if (text5 ==
null || text5.Length == 0)
672 if (text ==
null && key2.Length == 0)
687 int length = prefix.Length;
688 foreach (
string key
in namespaces.Namespaces.
Keys)
690 if (key.Length > length)
693 int length2 = text2.Length;
694 if (text2.Length > length && text2.Length <= length +
"2147483647".Length && text2.StartsWith(prefix,
StringComparison.Ordinal))
697 for (
int i = length; i < text2.Length; i++)
699 if (!
char.IsDigit(text2, i))
708 if (num <=
int.MaxValue)
713 hashtable.
Add(num2, num2);
720 if (hashtable.
Count > 0)
739 if (name !=
null && name.Length != 0)
759 if (name !=
null && name.Length != 0)
779 if (name !=
null && name.Length != 0)
797 if (o !=
null && objectsInUse !=
null)
824 if (serializable ==
null)
994 WriteElement(node, name, ns, isNullable, any);
1017 WriteElement(node, name, ns, isNullable, any);
1021 private void WriteElement(
XmlNode node,
string name,
string ns,
bool isNullable,
bool any)
1023 if (typeof(
XmlAttribute).IsAssignableFrom(node.GetType()))
1041 if (node is XmlElement && name !=
null && name.Length > 0 && (node.
LocalName != name || node.
NamespaceURI != ns))
1043 throw new InvalidOperationException(Res.GetString(
"XmlElementNameMismatch", node.
LocalName, node.
NamespaceURI, name, ns));
1074 TypeDesc typeDesc =
new TypeScope().GetTypeDesc(type);
1075 if (!typeDesc.IsStructLike)
1174 w.
WriteAttributeString(
"ref",
"http://www.w3.org/2003/05/soap-encoding", GetId(o, addToReferencesList:
true));
1183 private bool IsIdDefined(
object o)
1185 if (references !=
null)
1192 private string GetId(
object o,
bool addToReferencesList)
1194 if (references ==
null)
1199 string text = (string)references[o];
1203 references.
Add(o, text);
1204 if (addToReferencesList)
1206 referencesToWrite.
Add(o);
1216 WriteId(o, addToReferencesList:
true);
1219 private void WriteId(
object o,
bool addToReferencesList)
1223 w.
WriteAttributeString(
"id",
"http://www.w3.org/2003/05/soap-encoding", GetId(o, addToReferencesList));
1244 if (xmlAttribute ==
null)
1248 if (xmlAttribute.
Value !=
null)
1250 if (xmlAttribute.
NamespaceURI ==
"http://schemas.xmlsoap.org/wsdl/" && xmlAttribute.
LocalName ==
"arrayType")
1252 string dims =
default(
string);
1255 WriteAttribute(
"arrayType",
"http://schemas.xmlsoap.org/wsdl/", value);
1270 if (value ==
null || localName ==
"xmlns" || localName.StartsWith(
"xmlns:",
StringComparison.Ordinal))
1274 int num = localName.IndexOf(
':');
1277 if (ns ==
"http://www.w3.org/XML/1998/namespace")
1280 if (text ==
null || text.Length == 0)
1293 string prefix = localName.Substring(0, num);
1304 if (value ==
null || localName ==
"xmlns" || localName.StartsWith(
"xmlns:",
StringComparison.Ordinal))
1308 int num = localName.IndexOf(
':');
1311 if (ns ==
"http://www.w3.org/XML/1998/namespace")
1314 if (text ==
null || text.Length == 0)
1327 string text2 = localName.Substring(0, num);
1331 XmlCustomFormatter.WriteArrayBase64(w, value, 0, value.Length);
1354 XmlCustomFormatter.WriteArrayBase64(w, value, 0, value.Length);
1364 protected void WriteAttribute(
string prefix,
string localName,
string ns,
string value)
1388 XmlCustomFormatter.WriteArrayBase64(w, value, 0, value.Length);
1436 if (xsiType ==
null)
1510 if (xsiType !=
null)
1529 if (xsiType !=
null)
1533 XmlCustomFormatter.WriteArrayBase64(w, value, 0, value.Length);
1582 if (!(value ==
null))
1584 if (value.Namespace ==
null || value.Namespace.Length == 0)
1593 if (xsiType !=
null)
1609 TypeEntry typeEntry =
new TypeEntry();
1610 typeEntry.typeName = typeName;
1611 typeEntry.typeNs = typeNs;
1612 typeEntry.type = type;
1613 typeEntry.callback = callback;
1614 typeEntries[type] = typeEntry;
1617 private void WriteArray(
string name,
string ns,
object o,
Type type)
1619 Type arrayElementType = TypeScope.GetArrayElementType(type,
null);
1623 while ((arrayElementType.
IsArray || typeof(
IEnumerable).IsAssignableFrom(arrayElementType)) && GetPrimitiveTypeName(arrayElementType, throwIfUnknown:
false) ==
null)
1625 arrayElementType = TypeScope.GetArrayElementType(arrayElementType,
null);
1626 stringBuilder.
Append(
"[]");
1631 if (arrayElementType == typeof(
object))
1634 ns2 =
"http://www.w3.org/2001/XMLSchema";
1638 TypeEntry typeEntry = GetTypeEntry(arrayElementType);
1639 if (typeEntry !=
null)
1641 text = typeEntry.typeName;
1642 ns2 = typeEntry.typeNs;
1646 XmlQualifiedName primitiveTypeName = GetPrimitiveTypeName(arrayElementType, throwIfUnknown:
false);
1647 if (primitiveTypeName !=
null)
1649 text = primitiveTypeName.Name;
1650 ns2 = primitiveTypeName.Namespace;
1655 while (baseType !=
null)
1657 typeEntry = GetTypeEntry(baseType);
1658 if (typeEntry !=
null)
1662 baseType = baseType.BaseType;
1664 if (typeEntry !=
null)
1666 text = typeEntry.typeName;
1667 ns2 = typeEntry.typeNs;
1672 ns2 =
"http://www.w3.org/2001/XMLSchema";
1678 XmlQualifiedName primitiveTypeName2 = GetPrimitiveTypeName(arrayElementType);
1679 text = primitiveTypeName2.Name;
1680 ns2 = primitiveTypeName2.Namespace;
1683 if (stringBuilder.
Length > 0)
1687 if (soap12 && name !=
null && name.Length > 0)
1693 WriteStartElement(
"Array",
"http://schemas.xmlsoap.org/soap/encoding/",
null, writePrefixed:
true);
1695 WriteId(o, addToReferencesList:
false);
1698 Array array = (Array)o;
1699 int length = array.Length;
1702 w.
WriteAttributeString(
"itemType",
"http://www.w3.org/2003/05/soap-encoding", GetQualifiedName(text, ns2));
1709 for (
int i = 0; i < length; i++)
1719 w.
WriteAttributeString(
"itemType",
"http://www.w3.org/2003/05/soap-encoding", GetQualifiedName(text, ns2));
1727 string str = (num >= 0) ? (
"[" + num +
"]") :
"[]";
1728 w.
WriteAttributeString(
"arrayType",
"http://schemas.xmlsoap.org/soap/encoding/", GetQualifiedName(text, ns2) + str);
1731 if (enumerator !=
null)
1795 if ((suppressReference || soap12) && !IsIdDefined(o))
1797 WriteReferencedElement(n, ns, o, ambientType);
1801 TypeEntry typeEntry = GetTypeEntry(type);
1810 bool flag = type != ambientType && !type.
IsEnum;
1811 TypeEntry typeEntry2 = GetTypeEntry(type);
1812 if (typeEntry2 !=
null)
1816 WriteStartElement(typeEntry2.typeName, typeEntry2.typeNs,
null, writePrefixed:
true);
1826 typeEntry2.callback(o);
1835 private void WriteReferencedElement(
object o,
Type ambientType)
1837 WriteReferencedElement(
null,
null, o, ambientType);
1840 private void WriteReferencedElement(
string name,
string ns,
object o,
Type ambientType)
1844 name =
string.Empty;
1849 WriteArray(name, ns, o, type);
1852 TypeEntry typeEntry = GetTypeEntry(type);
1853 if (typeEntry ==
null)
1857 WriteStartElement((name.Length == 0) ? typeEntry.typeName : name, (ns ==
null) ? typeEntry.typeNs : ns,
null, writePrefixed:
true);
1858 WriteId(o, addToReferencesList:
false);
1859 if (ambientType != type)
1863 typeEntry.callback(o);
1867 private TypeEntry GetTypeEntry(Type t)
1869 if (typeEntries ==
null)
1874 return (TypeEntry)typeEntries[t];
1883 if (referencesToWrite !=
null)
1885 for (
int i = 0; i < referencesToWrite.
Count; i++)
1887 WriteReferencedElement(referencesToWrite[i],
null);
1906 string text = (string)@
namespace.Key;
1907 string text2 = (string)@
namespace.Value;
1908 if (namespaces !=
null)
1910 string text3 = namespaces.Namespaces[text] as string;
1911 if (text3 !=
null && text3 != text2)
1916 string text4 = (text2 ==
null || text2.Length == 0) ?
null :
Writer.
LookupPrefix(text2);
1917 if (text4 ==
null || text4 != text)
1926 private string NextPrefix()
1928 if (usedPrefixes ==
null)
1930 return aliasBase + ++tempNamespacePrefix;
1932 while (usedPrefixes.
ContainsKey(++tempNamespacePrefix))
1935 return aliasBase + tempNamespacePrefix;
Converts a base data type to another base data type.
abstract Type BaseType
Gets the type from which the current T:System.Type directly inherits.
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
void WriteElementQualifiedName(string localName, XmlQualifiedName value)
Writes an XML element with a specified qualified name in its body.
WriteState
Specifies the state of the T:System.Xml.XmlWriter.
void WriteElementStringRaw(string localName, string value)
Writes an XML element with a specified value in its body.
void WriteValue(string value)
Writes a specified string value.
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
void WriteStartElement(string name, string ns, object o, bool writePrefixed)
Writes an opening element tag, including any attributes.
static byte [] FromByteArrayBase64(byte[] value)
Processes a base-64 byte array.
abstract string LocalName
Gets the local name of the node, when overridden in a derived class.
Exception CreateMismatchChoiceException(string value, string elementName, string enumValue)
Creates an T:System.InvalidOperationException that indicates that a value for an XML element does not...
void WriteElementLiteral(XmlNode node, string name, string ns, bool isNullable, bool any)
Instructs an T:System.Xml.XmlWriter object to write an T:System.Xml.XmlNode object within the body of...
void WriteElementQualifiedName(string localName, XmlQualifiedName value, XmlQualifiedName xsiType)
Writes an XML element with a specified qualified name in its body.
void WriteEndElement()
Writes a <closing> element tag.
bool EscapeName
Gets or sets a value that indicates whether the M:System.Xml.XmlConvert.EncodeName(System....
ArrayList Namespaces
Gets or sets a list of XML qualified name objects that contain the namespaces and prefixes used to pr...
Contains the XML namespaces and prefixes that the T:System.Xml.Serialization.XmlSerializer uses to ge...
virtual void Add(object key, object value)
Adds an element with the specified key and value into the T:System.Collections.Hashtable.
bool MoveNext()
Advances the enumerator to the next element of the collection.
void WriteElementStringRaw(string localName, string ns, byte[] value)
Writes an XML element with a specified value in its body.
void WriteAttribute(string prefix, string localName, string ns, string value)
Writes an XML attribute where the namespace prefix is provided manually.
void WriteStartElement(string name)
Writes an opening element tag, including any attributes.
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
static TypeCode GetTypeCode(Type type)
Gets the underlying type code of the specified T:System.Type.
static string FromXmlNmToken(string nmToken)
Encodes an XML name.
void WriteNullableStringEncodedRaw(string name, string ns, string value, XmlQualifiedName xsiType)
Writes an XML element that contains a string as the body. T:System.Xml.XmlWriter inserts an xsi:nil='...
void WriteNamespaceDeclarations(XmlSerializerNamespaces xmlns)
Writes the namespace declaration attributes.
void WriteNullTagEncoded(string name)
Writes an XML element with an xsi:nil='true' attribute.
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
abstract void WriteStartDocument()
When overridden in a derived class, writes the XML declaration with the version "1....
abstract void WriteTo(XmlWriter w)
Saves the current node to the specified T:System.Xml.XmlWriter, when overridden in a derived class.
void WriteAttribute(string localName, string ns, byte[] value)
Instructs an T:System.Xml.XmlWriter object to write an XML attribute.
void WriteNullableStringEncodedRaw(string name, string ns, byte[] value, XmlQualifiedName xsiType)
Writes a byte array as the body of an XML element. T:System.Xml.XmlWriter inserts an xsi:nil='true' a...
delegate void XmlSerializationWriteCallback(object o)
Delegate that is used by the T:System.Xml.Serialization.XmlSerializer class for serialization of type...
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
string FromXmlQualifiedName(XmlQualifiedName xmlQualifiedName, bool ignoreEmpty)
Produces a string that can be written as an XML qualified name, with invalid characters replaced by e...
void WriteStartElement(string name, string ns, bool writePrefixed)
Writes an opening element tag, including any attributes.
TypeCode
Specifies the type of an object.
static string FromXmlNmTokens(string nmTokens)
Encodes a space-delimited sequence of XML names into a single XML name.
static string FromTime(DateTime value)
Produces a string from a T:System.DateTime object.
void WriteStartDocument()
Writes the XML declaration if the writer is positioned at the start of an XML document.
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
void WriteAttribute(string localName, string ns, string value)
Writes an XML attribute.
void WriteEmptyTag(string name)
Writes an XML element whose body is empty.
Represents the root class for the Xml schema object model hierarchy and serves as a base class for cl...
static string FromByteArrayHex(byte[] value)
Produces a string from an input hexadecimal byte array.
Represents an attribute. Valid and default values for the attribute are defined in a document type de...
abstract void WriteEndAttribute()
When overridden in a derived class, closes the previous M:System.Xml.XmlWriter.WriteStartAttribute(Sy...
static string ToString(bool value)
Converts the T:System.Boolean to a T:System.String.
void WriteStartAttribute(string localName, string ns)
Writes the start of an attribute with the specified local name and namespace URI.
Represents an abstract class used for controlling serialization by the T:System.Xml....
void WriteXmlAttribute(XmlNode node, object container)
Writes the specified T:System.Xml.XmlNode object as an XML attribute.
static string EncodeLocalName(string name)
Converts the name to a valid XML local name.
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
void WriteReferencingElement(string n, string ns, object o, bool isNullable)
Writes a SOAP message XML element that contains a reference to a multiRef element for a given object.
void WriteTypedPrimitive(string name, string ns, object o, bool xsiType)
Writes an XML element whose text body is a value of a simple XML Schema data type.
abstract void WriteString(string text)
When overridden in a derived class, writes the given text content.
void WriteElementQualifiedName(string localName, string ns, XmlQualifiedName value)
Writes an XML element with a specified qualified name in its body.
virtual bool ContainsKey(object key)
Determines whether the T:System.Collections.Hashtable contains a specific key.
void WriteNullableStringEncoded(string name, string ns, string value, XmlQualifiedName xsiType)
Writes an XML element that contains a string as the body. T:System.Xml.XmlWriter inserts an xsi:nil='...
virtual bool IsEnum
Gets a value indicating whether the current T:System.Type represents an enumeration.
void WriteElementEncoded(XmlNode node, string name, string ns, bool isNullable, bool any)
Writes an XML node object within the body of a named XML element.
virtual string NamespaceURI
Gets the namespace URI of this node.
string Namespace
Gets a string representation of the namespace of the T:System.Xml.XmlQualifiedName.
void WriteXsiType(string name, string ns)
Writes an xsi:type attribute for an XML element that is being serialized into a document.
void WritePotentiallyReferencingElement(string n, string ns, object o)
Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a give...
abstract string LookupPrefix(string ns)
When overridden in a derived class, returns the closest prefix defined in the current namespace scope...
void WriteReferencingElement(string n, string ns, object o)
Writes a SOAP message XML element that contains a reference to a multiRef element for a given object.
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
void AddWriteCallback(Type type, string typeName, string typeNs, XmlSerializationWriteCallback callback)
Stores an implementation of the T:System.Xml.Serialization.XmlSerializationWriteCallback delegate and...
Exception CreateUnknownAnyElementException(string name, string ns)
Creates an T:System.InvalidOperationException that indicates that an XML element that should adhere t...
void WriteNullableStringLiteral(string name, string ns, string value)
Writes an XML element that contains a string as the body. T:System.Xml.XmlWriter inserts an xsi:nil='...
override string NamespaceURI
Gets the namespace URI of this node.
Exception CreateInvalidEnumValueException(object value, string typeName)
Creates an T:System.InvalidOperationException for an invalid enumeration value.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
void WriteSerializable(IXmlSerializable serializable, string name, string ns, bool isNullable)
Writes an object that uses custom XML formatting as an XML element.
bool IsArray
Gets a value that indicates whether the type is an array.
abstract void InitCallbacks()
Initializes an instances of the T:System.Xml.Serialization.XmlSerializationWriteCallback delegate to ...
void WriteReferencedElements()
Serializes objects into SOAP-encoded multiRef XML elements in a SOAP message.
string Name
Gets a string representation of the qualified name of the T:System.Xml.XmlQualifiedName.
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
void WriteElementString(string localName, string value)
Writes an XML element with a specified value in its body.
XmlWriter Writer
Gets or sets the T:System.Xml.XmlWriter that is being used by the T:System.Xml.Serialization....
static string FromDate(DateTime value)
Produces a string from a T:System.DateTime object.
void WriteNullableQualifiedNameEncoded(string name, string ns, XmlQualifiedName value, XmlQualifiedName xsiType)
Writes an XML element whose body contains a valid XML qualified name. T:System.Xml....
string FromXmlQualifiedName(XmlQualifiedName xmlQualifiedName)
Returns an XML qualified name, with invalid characters replaced by escape sequences.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
virtual ICollection Keys
Gets an T:System.Collections.ICollection containing the keys in the T:System.Collections....
void WriteElementStringRaw(string localName, string value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
void WriteRpcResult(string name, string ns)
Writes a SOAP 1.2 RPC result element with a specified qualified name in its body.
int Length
Gets or sets the length of the current T:System.Text.StringBuilder object.
void WriteXml(XmlWriter writer)
Converts an object into its XML representation.
object Current
Gets the element in the collection at the current position of the enumerator.
Represents an assembly, which is a reusable, versionable, and self-describing building block of a com...
void WriteNullableStringLiteralRaw(string name, string ns, string value)
Writes an XML element that contains a string as the body. T:System.Xml.XmlWriter inserts a xsi:nil='t...
void WriteStartElement(string name, string ns, object o)
Writes an opening element tag, including any attributes.
Represents type declarations: class types, interface types, array types, value types,...
Exception CreateInvalidAnyTypeException(object o)
Creates an T:System.InvalidOperationException that indicates the T:System.Xml.Serialization....
void WriteNullTagLiteral(string name)
Writes an XML element with an xsi:nil='true' attribute.
abstract void WriteEndElement()
When overridden in a derived class, closes one element and pops the corresponding namespace scope.
Represents an XML qualified name.
void WriteAttributeString(string localName, string ns, string value)
When overridden in a derived class, writes an attribute with the specified local name,...
void WriteStartElement(string name, string ns, object o, bool writePrefixed, XmlSerializerNamespaces xmlns)
Writes an opening element tag, including any attributes.
void WriteAttribute(string localName, string value)
Instructs the T:System.Xml.XmlWriter to write an XML attribute that has no namespace specified for it...
void WriteElementStringRaw(string localName, string ns, byte[] value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
static TypeCode GetTypeCode(object value)
Returns the T:System.TypeCode for the specified object.
void WriteElementStringRaw(string localName, string ns, string value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
void WriteEmptyTag(string name, string ns)
Writes an XML element whose body is empty.
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
virtual int Add(object value)
Adds an object to the end of the T:System.Collections.ArrayList.
static string FromDateTime(DateTime value)
Produces a string from an input T:System.DateTime.
static string FromXmlName(string name)
Encodes a valid XML name by replacing characters that are not valid with escape sequences.
void WriteId(object o)
Writes an id attribute that appears in a SOAP-encoded multiRef element.
void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType, bool suppressReference, bool isNullable)
Writes a SOAP message XML element that can contain a reference to a multiRef XML element for a given ...
void WriteSerializable(IXmlSerializable serializable, string name, string ns, bool isNullable, bool wrapped)
Instructs T:System.Xml.XmlNode to write an object that uses custom XML formatting as an XML element.
abstract void WriteRaw(char[] buffer, int index, int count)
When overridden in a derived class, writes raw markup manually from a character buffer.
override string LocalName
Gets the local name of the node.
void WriteElementStringRaw(string localName, byte[] value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
static Assembly ResolveDynamicAssembly(string assemblyFullName)
Gets a dynamically generated assembly by name.
static string FromEnum(long value, string[] values, long[] ids, string typeName)
Takes a numeric enumeration value and the names and constants from the enumerator list for the enumer...
void WriteElementStringRaw(string localName, string ns, string value)
Writes an XML element with a specified value in its body.
void TopLevelElement()
Initializes object references only while serializing a SOAP-encoded SOAP message.
void WriteValue(byte[] value)
Writes a base-64 byte array.
virtual bool Contains(object key)
Determines whether the T:System.Collections.Hashtable contains a specific key.
void WriteNullTagLiteral(string name, string ns)
Writes an XML element with an xsi:nil='true' attribute.
void WriteXmlAttribute(XmlNode node)
Writes the specified T:System.Xml.XmlNode as an XML attribute.
void WriteElementString(string localName, string ns, string value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
virtual void Remove(object key)
Removes the element with the specified key from the T:System.Collections.Hashtable.
void WriteNullTagEncoded(string name, string ns)
Writes an XML element with an xsi:nil='true' attribute.
Exception CreateUnknownTypeException(Type type)
Creates an T:System.InvalidOperationException that indicates that a type being serialized is not bein...
Represents a time interval.To browse the .NET Framework source code for this type,...
void WriteElementStringRaw(string localName, byte[] value)
Writes an XML element with a specified value in its body.
Exception CreateInvalidChoiceIdentifierValueException(string type, string identifier)
Creates an T:System.InvalidOperationException that indicates a failure while writing an array where a...
void WriteAttribute(string localName, byte[] value)
Instructs an T:System.Xml.XmlWriter object to write an XML attribute that has no namespace specified ...
static string FromChar(char value)
Produces a string from an input T:System.Char.
The exception that is thrown when a method call is invalid for the object's current state.
static Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Gets the T:System.Type with the specified name, specifying whether to throw an exception if the type ...
static string FromEnum(long value, string[] values, long[] ids)
Produces a string that consists of delimited identifiers that represent the enumeration members that ...
Exception CreateChoiceIdentifierValueException(string value, string identifier, string name, string ns)
Creates an T:System.InvalidOperationException that indicates an unexpected name for an element that a...
static string FromXmlNCName(string ncName)
Encodes a valid XML local name by replacing characters that are not valid with escape sequences.
Provides information about a specific culture (called a locale for unmanaged code development)....
Defines size, enumerators, and synchronization methods for all nongeneric collections.
override string Value
Gets or sets the value of the node.
void WriteNullableQualifiedNameLiteral(string name, string ns, XmlQualifiedName value)
Writes an XML element whose body contains a valid XML qualified name. T:System.Xml....
An abstract class that is the base class for T:System.Xml.Serialization.XmlSerializationReader and T:...
void WriteNullableStringLiteralRaw(string name, string ns, byte[] value)
Writes a byte array as the body of an XML element. T:System.Xml.XmlWriter inserts an xsi:nil='true' a...
Defines a dictionary key/value pair that can be set or retrieved.
override string Name
Gets the qualified name of the node.
void WriteElementString(string localName, string ns, string value)
Writes an XML element with a specified value in its body.
bool IsEmpty
Gets a value indicating whether the T:System.Xml.XmlQualifiedName is empty.
void WriteStartElement(string name, string ns)
Writes an opening element tag, including any attributes.
Exception CreateUnknownTypeException(object o)
Creates an T:System.InvalidOperationException that indicates that a type being serialized is not bein...
Provides custom formatting for XML serialization and deserialization.
void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType)
Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a give...
abstract WriteState WriteState
When overridden in a derived class, gets the state of the writer.
void WritePotentiallyReferencingElement(string n, string ns, object o, Type ambientType, bool suppressReference)
Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a give...
Represents a single node in the XML document.
Exception CreateInvalidAnyTypeException(Type type)
Creates an T:System.InvalidOperationException that indicates the T:System.Xml.Serialization....
void WriteElementString(string localName, string value, XmlQualifiedName xsiType)
Writes an XML element with a specified value in its body.
Supports a simple iteration over a non-generic collection.
void WriteElementString(string localName, string value)
Writes an element with the specified local name and value.
virtual int Count
Gets the number of key/value pairs contained in the T:System.Collections.Hashtable.
void WriteElementQualifiedName(string localName, string ns, XmlQualifiedName value, XmlQualifiedName xsiType)
Writes an XML element with a specified qualified name in its body.
Encodes and decodes XML names, and provides methods for converting between common language runtime ty...
void WriteStartElement(string localName, string ns)
When overridden in a derived class, writes the specified start tag and associates it with the given n...
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...
void WriteEndElement(object o)
Writes a <closing> element tag.