Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PersistentComponentStateSerializer<T> Class

Definition

Namespace:
Microsoft.AspNetCore.Components
Assembly:
Microsoft.AspNetCore.Components.dll
Package:
Microsoft.AspNetCore.Components v10.0.0
Package:
Microsoft.AspNetCore.Components v11.0.0-preview.4.26230.115
Source:
PersistentComponentStateSerializer.cs
Source:
PersistentComponentStateSerializer.cs

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.

Provides custom serialization logic for persistent component state values of type T.

public abstract class PersistentComponentStateSerializer<T>
type PersistentComponentStateSerializer<'T> = class
Public MustInherit Class PersistentComponentStateSerializer(Of T)

Type Parameters

T

The type of the value to serialize.

Inheritance
PersistentComponentStateSerializer<T>

Constructors

Name Description
PersistentComponentStateSerializer<T>()

Methods

Name Description
Persist(T, IBufferWriter<Byte>)

Serializes the provided value and writes it to the writer.

Restore(ReadOnlySequence<Byte>)

Deserializes a value of type T from the provided data. This method must be synchronous to avoid UI tearing during component state restoration.

Applies to


Feedback

Was this page helpful?