Generate API docs as markdown
This commit is contained in:
parent
ab7b83abbb
commit
85e90f7bd5
120 changed files with 14227 additions and 76482 deletions
|
|
@ -2,9 +2,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Class SerializationHelper | CapyKit Documentation </title>
|
||||
<title> Class SerializationHelper | CapyKit Documentation </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Class SerializationHelper | CapyKit Documentation ">
|
||||
<meta name="title" content=" Class SerializationHelper | CapyKit Documentation ">
|
||||
|
||||
|
||||
<link rel="icon" href="../favicon.ico">
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
</head>
|
||||
|
||||
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
||||
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
||||
<header class="bg-body border-bottom">
|
||||
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
||||
<div class="container-xxl flex-nowrap">
|
||||
|
|
@ -70,305 +70,99 @@
|
|||
<nav id="breadcrumb"></nav>
|
||||
</div>
|
||||
|
||||
<article data-uid="CapyKit.Helpers.SerializationHelper">
|
||||
|
||||
|
||||
|
||||
<h1 id="CapyKit_Helpers_SerializationHelper" data-uid="CapyKit.Helpers.SerializationHelper" class="text-break">
|
||||
Class SerializationHelper
|
||||
</h1>
|
||||
|
||||
<div class="facts text-secondary">
|
||||
<dl><dt>Namespace</dt><dd><a class="xref" href="CapyKit.html">CapyKit</a>.<a class="xref" href="CapyKit.Helpers.html">Helpers</a></dd></dl>
|
||||
<dl><dt>Assembly</dt><dd>CapyKit.dll</dd></dl>
|
||||
</div>
|
||||
|
||||
<div class="markdown summary"></div>
|
||||
<div class="markdown conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static class SerializationHelper</code></pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="typelist inheritance">
|
||||
<dt>Inheritance</dt>
|
||||
<dd>
|
||||
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
||||
<div><span class="xref">SerializationHelper</span></div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl class="typelist inheritedMembers">
|
||||
<dt>Inherited Members</dt>
|
||||
<dd>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 class="section" id="methods">Methods
|
||||
</h2>
|
||||
|
||||
|
||||
<a id="CapyKit_Helpers_SerializationHelper_Deserialize_" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize*"></a>
|
||||
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_Byte___" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize``1(System.Byte[])">
|
||||
Deserialize<T>(byte[])
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Deserializes an object to a given <code class="typeparamref">T</code> type.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static T Deserialize<T>(byte[] bytes)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>bytes</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</dt>
|
||||
<dd><p>The byte array representing a <code class="typeparamref">T</code> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><span class="xref">T</span></dt>
|
||||
<dd><p>A <code class="typeparamref">T</code> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Type Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>T</code></dt>
|
||||
<dd><p>Generic type parameter.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="section">Exceptions</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.formatexception">FormatException</a></dt>
|
||||
<dd><p>Thrown when the format of the byte array is incorrect.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<a id="CapyKit_Helpers_SerializationHelper_Deserialize_" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize*"></a>
|
||||
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_IO_Stream_" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize``1(System.IO.Stream)">
|
||||
Deserialize<T>(Stream)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Deserializes an object to a given <code class="typeparamref">T</code> type.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static T Deserialize<T>(Stream stream)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></dt>
|
||||
<dd><p>The steam.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><span class="xref">T</span></dt>
|
||||
<dd><p>A <code class="typeparamref">T</code> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Type Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>T</code></dt>
|
||||
<dd><p>Generic type parameter.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="section">Exceptions</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.formatexception">FormatException</a></dt>
|
||||
<dd><p>Thrown when the format of an input is incorrect.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<a id="CapyKit_Helpers_SerializationHelper_Deserialize_" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize*"></a>
|
||||
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_String_" data-uid="CapyKit.Helpers.SerializationHelper.Deserialize``1(System.String)">
|
||||
Deserialize<T>(string)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Deserializes a <code>JSON</code> encoded string to the given <code class="typeparamref">T</code>.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static T Deserialize<T>(string str)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>str</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>The <code>JSON</code> encoded string representing a <code class="typeparamref">T</code> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><span class="xref">T</span></dt>
|
||||
<dd><p>A <code class="typeparamref">T</code> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Type Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>T</code></dt>
|
||||
<dd><p>Generic type parameter.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="CapyKit_Helpers_SerializationHelper_SerializeToBytes_" data-uid="CapyKit.Helpers.SerializationHelper.SerializeToBytes*"></a>
|
||||
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_SerializeToBytes_System_Object_" data-uid="CapyKit.Helpers.SerializationHelper.SerializeToBytes(System.Object)">
|
||||
SerializeToBytes(object)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Serializes an object to a byte array.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static byte[] SerializeToBytes(object obj)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>obj</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
|
||||
<dd><p>The object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</dt>
|
||||
<dd><p>A <code>JSON</code> encoded string.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="CapyKit_Helpers_SerializationHelper_SerializeToString_" data-uid="CapyKit.Helpers.SerializationHelper.SerializeToString*"></a>
|
||||
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_SerializeToString_System_Object_" data-uid="CapyKit.Helpers.SerializationHelper.SerializeToString(System.Object)">
|
||||
SerializeToString(object)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Serializes an object to a <code>JSON</code> encoded string.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static string SerializeToString(object obj)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>obj</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
|
||||
<dd><p>The object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>A <code>JSON</code> encoded string.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<article data-uid="">
|
||||
<h1 id="CapyKit_Helpers_SerializationHelper"> Class SerializationHelper</h1>
|
||||
|
||||
<p>Namespace: <a href="CapyKit.Helpers.html">CapyKit.Helpers</a><br>
|
||||
Assembly: CapyKit.dll</p>
|
||||
<pre><code class="lang-csharp">public static class SerializationHelper
|
||||
</code></pre>
|
||||
<h4 id="inheritance">Inheritance</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ←
|
||||
<a href="CapyKit.Helpers.SerializationHelper.html">SerializationHelper</a></p>
|
||||
<h4 id="inherited-members">Inherited Members</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>,
|
||||
<a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a></p>
|
||||
<h4 id="extension-methods">Extension Methods</h4>
|
||||
<p><a href="CapyKit.Extensions.ObjectExtensions.html#CapyKit_Extensions_ObjectExtensions_UpdateProperties_System_Object_System_Object_">ObjectExtensions.UpdateProperties(object, object)</a></p>
|
||||
<h2 id="methods">Methods</h2>
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_Byte___"> Deserialize<T>(byte[])</h3>
|
||||
<p>Deserializes an object to a given <code class="typeparamref">T</code> type.</p>
|
||||
<pre><code class="lang-csharp">public static T Deserialize<T>(byte[] bytes)
|
||||
</code></pre>
|
||||
<h4 id="parameters">Parameters</h4>
|
||||
<p><code>bytes</code> <a href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</p>
|
||||
<p>The byte array representing a <code class="typeparamref">T</code> object.</p>
|
||||
<h4 id="returns">Returns</h4>
|
||||
<p>T</p>
|
||||
<p>A <code class="typeparamref">T</code> object.</p>
|
||||
<h4 id="type-parameters">Type Parameters</h4>
|
||||
<p><code>T</code></p>
|
||||
<p>Generic type parameter.</p>
|
||||
<h4 id="exceptions">Exceptions</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.formatexception">FormatException</a></p>
|
||||
<p>Thrown when the format of the byte array is incorrect.</p>
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_IO_Stream_"> Deserialize<T>(Stream)</h3>
|
||||
<p>Deserializes an object to a given <code class="typeparamref">T</code> type.</p>
|
||||
<pre><code class="lang-csharp">public static T Deserialize<T>(Stream stream)
|
||||
</code></pre>
|
||||
<h4 id="parameters-1">Parameters</h4>
|
||||
<p><code>stream</code> <a href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></p>
|
||||
<p>The steam.</p>
|
||||
<h4 id="returns-1">Returns</h4>
|
||||
<p>T</p>
|
||||
<p>A <code class="typeparamref">T</code> object.</p>
|
||||
<h4 id="type-parameters-1">Type Parameters</h4>
|
||||
<p><code>T</code></p>
|
||||
<p>Generic type parameter.</p>
|
||||
<h4 id="exceptions-1">Exceptions</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.formatexception">FormatException</a></p>
|
||||
<p>Thrown when the format of an input is incorrect.</p>
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_Deserialize__1_System_String_"> Deserialize<T>(string)</h3>
|
||||
<p>Deserializes a <code>JSON</code> encoded string to the given <code class="typeparamref">T</code>.</p>
|
||||
<pre><code class="lang-csharp">public static T Deserialize<T>(string str)
|
||||
</code></pre>
|
||||
<h4 id="parameters-2">Parameters</h4>
|
||||
<p><code>str</code> <a href="https://learn.microsoft.com/dotnet/api/system.string">string</a></p>
|
||||
<p>The <code>JSON</code> encoded string representing a <code class="typeparamref">T</code> object.</p>
|
||||
<h4 id="returns-2">Returns</h4>
|
||||
<p>T</p>
|
||||
<p>A <code class="typeparamref">T</code> object.</p>
|
||||
<h4 id="type-parameters-2">Type Parameters</h4>
|
||||
<p><code>T</code></p>
|
||||
<p>Generic type parameter.</p>
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_SerializeToBytes_System_Object_"> SerializeToBytes(object)</h3>
|
||||
<p>Serializes an object to a byte array.</p>
|
||||
<pre><code class="lang-csharp">public static byte[] SerializeToBytes(object obj)
|
||||
</code></pre>
|
||||
<h4 id="parameters-3">Parameters</h4>
|
||||
<p><code>obj</code> <a href="https://learn.microsoft.com/dotnet/api/system.object">object</a></p>
|
||||
<p>The object.</p>
|
||||
<h4 id="returns-3">Returns</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</p>
|
||||
<p>A <code>JSON</code> encoded string.</p>
|
||||
<h3 id="CapyKit_Helpers_SerializationHelper_SerializeToString_System_Object_"> SerializeToString(object)</h3>
|
||||
<p>Serializes an object to a <code>JSON</code> encoded string.</p>
|
||||
<pre><code class="lang-csharp">public static string SerializeToString(object obj)
|
||||
</code></pre>
|
||||
<h4 id="parameters-4">Parameters</h4>
|
||||
<p><code>obj</code> <a href="https://learn.microsoft.com/dotnet/api/system.object">object</a></p>
|
||||
<p>The object.</p>
|
||||
<h4 id="returns-4">Returns</h4>
|
||||
<p><a href="https://learn.microsoft.com/dotnet/api/system.string">string</a></p>
|
||||
<p>A <code>JSON</code> encoded string.</p>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue