Serialize Method
Definition
- Namespace
- Codebelt.Extensions.YamlDotNet.Formatters
- Assemblies
- Codebelt.Extensions.YamlDotNet.dll
Serialize(object, Type)
Serializes the specified source to an object of Stream.
public override Stream Serialize(object source, Type objectType)
Parameters
sourceobjectThe object to serialize to YAML format.
objectTypeTypeThe type of the object to serialize.
Returns
- Stream
A stream of the serialized
source.
Exceptions
- ArgumentNullException
sourceis null -or-objectTypeis null.