// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System.IO;
using System.Text;
namespace Microsoft.ClearScript
{
///
/// Provides an abstract representation of a document.
///
public abstract class Document
{
// ReSharper disable EmptyConstructor
///
/// Initializes a new instance.
///
protected Document()
{
// the help file builder (SHFB) insists on an empty constructor here
}
// ReSharper restore EmptyConstructor
///
/// Gets a structure containing meta-information for the document.
///
public abstract DocumentInfo Info { get; }
///
/// Gets a stream that provides read access to the document.
///
public abstract Stream Contents { get; }
///
/// Gets the document's character encoding.
///
///
/// This property returns null if the document contains binary data or if its
/// character encoding is unknown.
///
public virtual Encoding Encoding => null;
}
}