BinarySerializationFormatterDeserializeByReaderT(BinaryReader, IEnumerableType) Method
Deserializes the content of a serialization stream wrapped by the specified
reader from its current position
into an instance of
T.
See the
Remarks section of the
DeserializeByReaderT(BinaryReader, Type) overload for details.
Namespace: KGySoft.Serialization.BinaryAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public T DeserializeByReader<T>(
BinaryReader reader,
IEnumerable<Type>? expectedCustomTypes
)
Public Function DeserializeByReader(Of T) (
reader As BinaryReader,
expectedCustomTypes As IEnumerable(Of Type)
) As T
public:
generic<typename T>
T DeserializeByReader(
BinaryReader^ reader,
IEnumerable<Type^>^ expectedCustomTypes
)
member DeserializeByReader :
reader : BinaryReader *
expectedCustomTypes : IEnumerable<Type> -> 'T
- reader BinaryReader
- The reader that wraps the stream containing the serialized data. The reader will remain open after deserialization.
- expectedCustomTypes IEnumerableType
- The types that are expected to present in the serialization stream by name.
If SafeMode is not enabled in Options
or the stream does not contain any types by name, then this parameter can be .
- T
- The expected type of the result.
TThe deserialized instance of
T.