Compartir a través de


XmlPreloadedResolver.Add Method (Uri, array<Byte[], Int32, Int32)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Adds a Stream, byte array, or string with preloaded data to the XmlPreloadedResolver store and maps it to a URI. If the store already contains a mapping for the same URI, the existing mapping is overridden.

Namespace:  System.Xml.Resolvers
Assembly:  System.Xml.Utils (in System.Xml.Utils.dll)

Syntax

'Declaration
Public Sub Add ( _
    uri As Uri, _
    value As Byte(), _
    offset As Integer, _
    count As Integer _
)
public void Add(
    Uri uri,
    byte[] value,
    int offset,
    int count
)

Parameters

  • value
    Type: array<System.Byte[]
    A byte array with the data corresponding to the provided URI.
  • offset
    Type: System.Int32
    The offset in the provided byte array where the data starts.
  • count
    Type: System.Int32
    The number of bytes to read from the byte array, starting at the provided offset.

Exceptions

Exception Condition
ArgumentNullException

uri or value is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

offset or count is less than 0.

-or-

The length of the value minus offset is less than count.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.