src/Cake.Yaml/YamlAliases.cs
/// <summary>
/// Serializes an object to a YAML string.
/// </summary>
/// <returns>The YAML string.</returns>
/// <param name="context">The context.</param>
/// <param name="instance">The object to serialize.</param>
/// <param name="settings">The <see cref="SerializeYamlSettings"/> that will be used to build the serializer.</param>
/// <typeparam name="T">The type of object to serialize.</typeparam>
Serializes an object to a YAML string.
Serializes an object to a YAML string .
[CakeMethodAlias]
        public static string SerializeYaml<T>(this ICakeContext context, T instance, SerializeYamlSettings settings)
        {
            if (settings is null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            var s = BuildSerializer(settings);
            var sb = new StringBuilder();
            using (var tw = new StringWriter(sb))
            {
                s.Serialize(tw, instance);
            }
            return sb.ToString();
        }
[ CakeMethodAlias ] public static string SerializeYaml < T > ( this ICakeContext context , T instance , SerializeYamlSettings settings ) { if ( settings is null ) { throw new ArgumentNullException ( nameof ( settings ) ) ; } var s = BuildSerializer ( settings ) ; var sb = new StringBuilder ( ) ; using ( var tw = new StringWriter ( sb ) ) { s . Serialize ( tw , instance ) ; } return sb . ToString ( ) ; }
Serializes an object to a YAML string.
Serializes an object to a YAML string .
The YAML string.
The YAML string .
ICakeContext
this
instance
T
The object to serialize.
The object to serialize .
settings
SerializeYamlSettings
The  that will be used to build the serializer.
The that will be used to build the serializer .
context
None
typeparam
The type of object to serialize.
The type of object to serialize .