mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
Done CosmosEncodingProvider api docs
This commit is contained in:
parent
430551773f
commit
bdeb12376a
1 changed files with 25 additions and 0 deletions
|
|
@ -4,18 +4,38 @@ using Cosmos.Debug.Kernel;
|
||||||
|
|
||||||
namespace Cosmos.System.ExtendedASCII
|
namespace Cosmos.System.ExtendedASCII
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// CosmosEncodingProvider class. Used to provide <see cref="Encoder"/>, by using its name or codepage. See also: <seealso cref="EncodingProvider"/>.
|
||||||
|
/// </summary>
|
||||||
public class CosmosEncodingProvider : EncodingProvider
|
public class CosmosEncodingProvider : EncodingProvider
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Encoding provider.
|
||||||
|
/// </summary>
|
||||||
private static readonly EncodingProvider s_singleton = new CosmosEncodingProvider();
|
private static readonly EncodingProvider s_singleton = new CosmosEncodingProvider();
|
||||||
|
/// <summary>
|
||||||
|
/// Debugger inctanse of the "System" with the "CosmosEncodingProvider" tag.
|
||||||
|
/// </summary>
|
||||||
private static Debugger myDebugger = new Debugger("System", "CosmosEncodingProvider");
|
private static Debugger myDebugger = new Debugger("System", "CosmosEncodingProvider");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create new inctanse of the <see cref="CosmosEncodingProvider"/> class.
|
||||||
|
/// </summary>
|
||||||
internal CosmosEncodingProvider() { }
|
internal CosmosEncodingProvider() { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get CosmosEncodingProvider instance. Returns EncodingProvider.
|
||||||
|
/// </summary>
|
||||||
public static EncodingProvider Instance
|
public static EncodingProvider Instance
|
||||||
{
|
{
|
||||||
get { return s_singleton; }
|
get { return s_singleton; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get encoding, using its codepage.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="codepage">Codepage.</param>
|
||||||
|
/// <returns>Encoding value.</returns>
|
||||||
public override Encoding GetEncoding(int codepage)
|
public override Encoding GetEncoding(int codepage)
|
||||||
{
|
{
|
||||||
myDebugger.SendInternal($"Getting Encoding for codepage {codepage}");
|
myDebugger.SendInternal($"Getting Encoding for codepage {codepage}");
|
||||||
|
|
@ -26,6 +46,11 @@ namespace Cosmos.System.ExtendedASCII
|
||||||
return EncodingTable.GetEncoding(codepage);
|
return EncodingTable.GetEncoding(codepage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get encoding, using its name.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">Name.</param>
|
||||||
|
/// <returns>Encoding value.</returns>
|
||||||
public override Encoding GetEncoding(string name)
|
public override Encoding GetEncoding(string name)
|
||||||
{
|
{
|
||||||
myDebugger.SendInternal($"Getting Encoding for codepage with name {name}");
|
myDebugger.SendInternal($"Getting Encoding for codepage with name {name}");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue