Activity.Save Method

Definition

Saves a copy of the Activity to a Stream.

Overloads

Save(Stream)

Writes the Activity to a Stream for persistence.

Save(Stream, IFormatter)

Writes the Activity to a Stream for persistence using the custom IFormatter provided for serialization.

Save(Stream)

Writes the Activity to a Stream for persistence.

C#
public void Save(System.IO.Stream stream);

Parameters

stream
Stream

The Stream to which to save the Activity.

Exceptions

stream is a null reference (Nothing in Visual Basic).

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

Save(Stream, IFormatter)

Writes the Activity to a Stream for persistence using the custom IFormatter provided for serialization.

C#
public void Save(System.IO.Stream stream, System.Runtime.Serialization.IFormatter formatter);

Parameters

stream
Stream

The target Stream of the save operation.

formatter
IFormatter

The binary or custom IFormatter for the serialization.

Exceptions

stream is a null reference (Nothing in Visual Basic).

-or-

formatter is a null reference (Nothing).

This instance is in design mode.

Remarks

Soap formatters are not supported by Windows Workflow Foundation.

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