แก้ไข

แชร์ผ่าน


PreserializedResourceWriter.AddActivatorResource Method

Definition

Adds a resource of the specified type represented by a Stream value that is passed to the type's constructor when reading the resource.

public void AddActivatorResource (string name, System.IO.Stream value, string typeName, bool closeAfterWrite = false);
member this.AddActivatorResource : string * System.IO.Stream * string * bool -> unit
Public Sub AddActivatorResource (name As String, value As Stream, typeName As String, Optional closeAfterWrite As Boolean = false)

Parameters

name
String

The resource name.

value
Stream

The value of the resource in Stream form understood by the type's constructor.

typeName
String

The assembly qualified type name of the resource.

closeAfterWrite
Boolean

An optional value that indicates whether, after resources have been written, the stream should be closed (true) or left open (false, the default value).

Exceptions

name, typeName, or value is null.

The object's type is Stream, but it is unseekable.

Applies to