You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OnDoc/VSdoc/topic_0000000000000350.html

910 lines
18 KiB

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="GENERATOR" content="VSdocman - documentation generator; https://www.helixoft.com" />
<link rel="icon" href="favicon.ico">
<title>HelpPageSampleGenerator Class</title>
<link rel="stylesheet" type="text/css" href="msdn2019/toc.css" />
<script src="msdn2019/toc.js"></script>
<link rel="stylesheet" type="text/css" href="msdn2019/msdn2019.css">
<script src="msdn2019/msdn2019.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shCore_helixoft.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushVb.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushFSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCpp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushJScript.js" type="text/javascript"></script>
<link href="SyntaxHighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="SyntaxHighlighter/styles/shThemeMsdnLW.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
<link rel="stylesheet" type="text/css" href="vsdocman_overrides.css">
</head>
<body style="direction: ltr;">
<div id="topic">
<!--HEADER START-->
<div id="header">
<div id="header-top-container">
<div id="header-top-parent-container1">
<div id="header-top-container1">
<div id="runningHeaderText1"><a id="headerLogo" href="#" onclick="window.location.href = getCssCustomProperty('--headerLogoLink'); return false;">logo</a></div>
<div id="runningHeaderText1b"><script>
document.write(getCssCustomProperty('--headerTopCustomLineHtml'));
</script></div>
</div>
</div>
<div id="header-top-container2">
<div id="runningHeaderText">SOLUTION-WIDE PROPERTIES Reference</div>
<div id="search-bar-container">
<form id="search-bar" action="search--.html">
<input id="HeaderSearchInput" type="search" name="search" placeholder="Search" >
<button id="btn-search" class="c-glyph" title="Search">
<span>Search</span>
</button>
</form>
<button id="cancel-search" class="cancel-search" title="Cancel">
<span>Cancel</span>
</button>
</div>
</div>
</div>
<hr />
<div id="header-breadcrumbs"></div>
<div id="headerLinks">
</div>
<hr />
</div>
<!--HEADER END-->
<div id="mainSection">
<div id="toc-area">
<div id="toc-container" class="stickthis full-height">
<div id="-1"></div>
<div id="c-1">
<div id="ci-1" class="inner-for-height"></div>
</div>
</div>
</div>
<div id="mainBody">
<h1 class="title">HelpPageSampleGenerator Class</h1>
<div class="metadata">
Namespace:
<a href="topic_00000000000002F9.html">EDOKAAPI_NetFramework.Areas.HelpPage</a>
<br />Assembly: EDOKAAPI_NetFramework (in EDOKAAPI_NetFramework.dll)
</div>
<summary-info>This class will generate the samples for the help page.</summary-info>
<div class="section_container">
<div id="syntaxSection" class="section">
<div id="syntaxCodeBlocks">
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCornerActive">
</div>
<div class="codeSnippetTab csFirstTab csActiveTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeVB">
<pre xml:space="preserve" class="brush: vb">Public Class HelpPageSampleGenerator</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csActiveTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCsharp">
<pre xml:space="preserve" class="brush: csharp">public class HelpPageSampleGenerator</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csActiveTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCpp">
<pre xml:space="preserve" class="brush: cpp">public ref class HelpPageSampleGenerator </pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csActiveTab csLastTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCornerActive">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeJScript">
<pre xml:space="preserve" class="brush: js">public class HelpPageSampleGenerator</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Constructors</a></span>
<div>&nbsp;</div>
</div>
<div id="ConstructorsSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public constructor" title="Public constructor" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000351.html">HelpPageSampleGenerator()</a>
</td>
<td>
Initializes a new instance of the <a target="_top" href="topic_0000000000000350.html" onclick="this.target='';return true;">HelpPageSampleGenerator</a> class.
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Properties</a></span>
<div>&nbsp;</div>
</div>
<div id="PropertiesSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000353.html">ActionSamples</a>
</td>
<td>
Gets the objects that are used directly as samples for certain actions.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000352.html">ActualHttpMessageTypes</a>
</td>
<td>
Gets CLR types that are used as the content of <a target="_top" href=".html" onclick="this.target='';return true;">HttpRequestMessage</a> or <a target="_top" href=".html" onclick="this.target='';return true;">HttpResponseMessage</a>.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000355.html">SampleObjectFactories</a>
</td>
<td>
Gets factories for the objects that the supported formatters will serialize as samples. Processed in order,
stopping when the factory successfully returns a non-<a target="_top" href="topic_00000000000004A8.html" onclick="this.target='';return true;">&lt;default&gt;</a> object.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000354.html">SampleObjects</a>
</td>
<td>
Gets the objects that are serialized as samples by the supported formatters.
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Methods</a></span>
<div>&nbsp;</div>
</div>
<div id="MethodsSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000359.html">GetActionSample(string, string, IEnumerable&lt;String&gt;, Type, MediaTypeFormatter, MediaTypeHeaderValue, SampleDirection)</a>
</td>
<td>
Search for samples that are provided directly through <a target="_top" href="topic_0000000000000353.html" onclick="this.target='';return true;">ActionSamples</a>.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000358.html">GetSample(ApiDescription, SampleDirection)</a>
</td>
<td>
Gets the request or response body samples.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_000000000000035A.html">GetSampleObject(Type)</a>
</td>
<td>
Gets the sample object that will be serialized by the formatters.
First, it will look at the <a target="_top" href="topic_0000000000000354.html" onclick="this.target='';return true;">SampleObjects</a>. If no sample object is found, it will try to create
one using <a target="_top" href=".html" onclick="this.target='';return true;">DefaultSampleObjectFactory</a> (which wraps an <a target="_top" href="topic_0000000000000377.html" onclick="this.target='';return true;">ObjectGenerator</a>) and other
factories in <a target="_top" href="topic_0000000000000355.html" onclick="this.target='';return true;">SampleObjectFactories</a>.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000356.html">GetSampleRequests(ApiDescription)</a>
</td>
<td>
Gets the request body samples for a given <a target="_top" href=".html" onclick="this.target='';return true;">ApiDescription</a>.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000357.html">GetSampleResponses(ApiDescription)</a>
</td>
<td>
Gets the response body samples for a given <a target="_top" href=".html" onclick="this.target='';return true;">ApiDescription</a>.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_000000000000035B.html">ResolveHttpRequestMessageType(ApiDescription)</a>
</td>
<td>
Resolves the actual type of <a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.objectcontent-1">ObjectContent&lt;T&gt;</a> passed to the <a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httprequestmessage">HttpRequestMessage</a> in an action.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_000000000000035C.html">ResolveType(ApiDescription, string, string, IEnumerable&lt;String&gt;, SampleDirection, out Collection&lt;MediaTypeFormatter&gt;)</a>
</td>
<td>
Resolves the type of the action parameter or return value when <a target="_top" href=".html" onclick="this.target='';return true;">HttpRequestMessage</a> or <a target="_top" href=".html" onclick="this.target='';return true;">HttpResponseMessage</a> is used.
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_000000000000035D.html">WriteSampleObjectUsingFormatter(MediaTypeFormatter, object, Type, MediaTypeHeaderValue)</a>
</td>
<td>
Writes the sample object using formatter.
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Extension Methods</a></span>
<div>&nbsp;</div>
</div>
<div id="ExtensionMethodsSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
inheritedMember
">
<td>
<img alt="Public extension method" title="Public extension method" src="msdn2019/pubextensionmethod.png"></img>
</td>
<td>
<a href="topic_00000000000002E2.html">NameOf(this object)</a>
</td>
<td>
(Defined by <a target="_top" href="topic_00000000000002E0.html" onclick="this.target='';return true;">NLogHelper</a>).
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<!-- Classes -->
<!-- Classes End -->
<!-- Standard Modules -->
<!-- Standard Modules End -->
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Applies to</a></span>
<div>&nbsp;</div>
</div>
<div id="frameworksSection" class="section">
<h4 class="subHeading">.NET Framework</h4>Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8<br />
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">See Also</a></span>
<div>&nbsp;</div>
</div>
<div id="seeAlsoSection" class="section">
<div>
<a href="topic_00000000000002F9.html">EDOKAAPI_NetFramework.Areas.HelpPage Namespace</a><br />
</div>
</div>
</div>
</div>
<div id="internal-toc-area">
<div id="internal-toc-container" class="stickthis">
<h3 id="internal-toc-heading">In this article</h3>
<span id="internal-toc-definition-localized-text">Definition</span>
</div>
</div>
</div>
<div id="footer">
<div id="footer-container">
<p>Generated with <a target="_top" href="http://www.helixoft.com/vsdocman/overview.html">VSdocman</a></p>
</div>
</div>
</div>
</body>
</html>