﻿namespace Nancy
{
    using System.Collections.Generic;
    using System.IO;

    public interface ISerializer
    {
        /// <summary>
        /// Whether the serializer can serialize the content type
        /// </summary>
        /// <param name="contentType">Content type to serialize</param>
        /// <returns>True if supported, false otherwise</returns>
        bool CanSerialize(string contentType);

        /// <summary>
        /// Gets the list of extensions that the serializer can handle.
        /// </summary>
        /// <value>An <see cref="IEnumerable{T}"/> of extensions if any are available, otherwise an empty enumerable.</value>
        IEnumerable<string> Extensions { get; }

        /// <summary>
        /// Serialize the given model with the given contentType
        /// </summary>
        /// <param name="contentType">Content type to serialize into</param>
        /// <param name="model">Model to serialize</param>
        /// <param name="outputStream">Output stream to serialize to</param>
        /// <returns>Serialized object</returns>
        void Serialize<TModel>(string contentType, TModel model, Stream outputStream);
    }
}
﻿namespace Nancy
{
    using System.Collections.Generic;
    using System.IO;

    public interface ISerializer
    {
        /// <summary>
        /// Whether the serializer can serialize the content type
        /// </summary>
        /// <param name="contentType">Content type to serialise</param>
        /// <returns>True if supported, false otherwise</returns>
        bool CanSerialize(string contentType);

        /// <summary>
        /// Gets the list of extensions that the serializer can handle.
        /// </summary>
        /// <value>An <see cref="IEnumerable{T}"/> of extensions if any are available, otherwise an empty enumerable.</value>
        IEnumerable<string> Extensions { get; }

        /// <summary>
        /// Serialize the given model with the given contentType
        /// </summary>
        /// <param name="contentType">Content type to serialize into</param>
        /// <param name="model">Model to serialize</param>
        /// <param name="outputStream">Output stream to serialize to</param>
        /// <returns>Serialised object</returns>
        void Serialize<TModel>(string contentType, TModel model, Stream outputStream);
    }
}
Revert "Swapping Silly UK English ;)"
Revert "Swapping Silly UK English ;)"

This reverts commit 3b10acc9f764cf31b2718abf906b28ce7d200cff.
