XmlStreamStore Constructors

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Initializes a new instance of the XmlStreamStore class.

Overloads

XmlStreamStore(Stream)

Initializes a new instance of the XmlStreamStore class with a specified I/O Stream.

XmlStreamStore(Stream, IDictionary<Uri,IList<Uri>>)

Initializes a new instance of the XmlStreamStore class with a specified I/O Stream and dictionary of known compatible namespaces.

XmlStreamStore(Stream)

Initializes a new instance of the XmlStreamStore class with a specified I/O Stream.

C#
public XmlStreamStore(System.IO.Stream stream);

Parameters

stream
Stream

The I/O stream for reading and writing user annotations.

Remarks

stream must be in valid XML format and comply with the Microsoft Annotations Framework schema.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XmlStreamStore(Stream, IDictionary<Uri,IList<Uri>>)

Initializes a new instance of the XmlStreamStore class with a specified I/O Stream and dictionary of known compatible namespaces.

C#
public XmlStreamStore(System.IO.Stream stream, System.Collections.Generic.IDictionary<Uri,System.Collections.Generic.IList<Uri>> knownNamespaces);

Parameters

stream
Stream

The I/O stream for reading and writing user annotations.

knownNamespaces
IDictionary<Uri,IList<Uri>>

A dictionary with a list of known compatible namespaces.

Exceptions

stream is null.

stream contains invalid XML.

The knownNamespaces dictionary contains a duplicate namespace.

-or-

The knownNamespaces dictionary contains an element that has a null key.

Remarks

This XmlStreamStore constructor enables the registration of application-specific known namespaces.

The knownNamespace dictionary defines application namespaces that are used when you store custom content as part of an annotation. The dictionary key is the primary namespace known to the application program. The namespace key is associated with a value list of older namespaces that are compatible with the "key" namespace. When annotations are loaded all namespaces from this list will be replaced by the "key" namespace.

stream must be in valid XML format and comply with the Annotations Schema.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10