OutputCache.Serialize Method

.NET Framework 4.6 and 4.5

Serializes output-cache data into binary data.

Namespace:  System.Web.Caching
Assembly:  System.Web (in System.Web.dll)

[SecurityPermissionAttribute(SecurityAction.Assert, Flags = SecurityPermissionFlag.SerializationFormatter)]
public static void Serialize(
	Stream stream,
	Object data
)

Parameters

stream
Type: System.IO.Stream

The object to contain the serialized binary data.

data
Type: System.Object

The output-cache data to serialize.

ExceptionCondition
ArgumentException

data is not one of the specified output-cache types.

ArgumentNullException

data is null or stream is null.

This method is used by output-cache providers that are operating under partial trust.

.NET Framework

Supported in: 4.6, 4.5, 4
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft