<PackageReference Include="System.Runtime.Serialization.Formatters" Version="11.0.0-preview.3.26207.106" />

System.Runtime.Serialization.FormatterServices

public static class FormatterServices
Provides static methods to aid with the implementation of a Formatter for serialization. This class cannot be inherited.
public static void CheckTypeSecurity(Type t, TypeFilterLevel securityLevel)

Determines whether the specified Type can be deserialized with the TypeFilterLevel property set to Low.

public static object[] GetObjectData(object obj, MemberInfo[] members)

Extracts the data from the specified object and returns it as an array of objects.

public static object GetSafeUninitializedObject(Type type)

Creates a new instance of the specified object type.

public static MemberInfo[] GetSerializableMembers(Type type)

Gets all the serializable members for a class of the specified Type.

public static MemberInfo[] GetSerializableMembers(Type type, StreamingContext context)

Gets all the serializable members for a class of the specified Type and in the provided StreamingContext.

Returns a serialization surrogate for the specified ISerializationSurrogate.

public static Type GetTypeFromAssembly(Assembly assem, string name)

Looks up the Type of the specified object in the provided Assembly.

public static object GetUninitializedObject(Type type)

Creates a new instance of the specified object type.

public static object PopulateObjectMembers(object obj, MemberInfo[] members, object[] data)

Populates the specified object with values for each field drawn from the data array of objects.