<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>P4Form.LoadFromSpec Method</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner"> <div id="bannerrow1">
<table class="bannerparthead" cellspacing="0" id="Table1">
<tr id="hdr">
<td class="runninghead">Perforce API for the .Net CLR</td>
<td class="product"><img alt="P4.Net" src="p4net.GIF" /></td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">P4Form.LoadFromSpecMethod</h1>
</div>
</div>
<div id="nstext">
<p> Parses a Perforce form without making a server connection. </p>
<div class="syntax">
<span class="lang">[VisualBasic]</span>
<br />PublicSharedFunctionLoadFromSpec( _<br />ByVal <i>formCommand</i>As<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a>,_<br />ByVal <i>specDef</i>As<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a>,_<br />ByVal <i>formContents</i>As<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a>,_<br />ByVal <i>encoding</i>As<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTextEncodingClassTopic.htm">Encoding</a>_<br />)As<a href="P4API.P4Form.html">P4Form</a></div>
<div class="syntax">
<span class="lang">[C#]</span>
<br />publicstatic<a href="P4API.P4Form.html">P4Form</a>LoadFromSpec(<br /><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a><i>formCommand</i>,<br /><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a><i>specDef</i>,<br /><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a><i>formContents</i>,<br /><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTextEncodingClassTopic.htm">Encoding</a><i>encoding</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i>formCommand</i>
</dt>
<dd>The command that would otherwise be used to fetch the form.</dd>
<dt>
<i>specDef</i>
</dt>
<dd>The Perforce 'specdef' for the form.</dd>
<dt>
<i>formContents</i>
</dt>
<dd>The raw formated form text.</dd>
<dt>
<i>encoding</i>
</dt>
<dd>Server encoding (either ANSI or UFT-8).</dd>
</dl>
<h4 class="dtH4">Return Value</h4>
<p>A Perforce form object.</p>
<h4 class="dtH4">Remarks</h4>
<p> LoadFromSpec can be used to parse a form without making a call to the server. LoadFromSpec can be useful in form triggers. It does require you to know the SpecDef to call, which can change when upgrading or changing the server configuration. </p>
<h4 class="dtH4">See Also</h4>
<p>
<a href="P4API.P4Form.html">P4Form Class</a> | <a href="P4API.html">P4API Namespace</a></p>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
<param name="Keyword" value="LoadFromSpec method">
</param>
<param name="Keyword" value="LoadFromSpec method, P4Form class">
</param>
<param name="Keyword" value="P4Form.LoadFromSpec method">
</param>
</object>
<hr />
<div id="footer">
<p>
<a href="Copyright.html">Copyright 2006 Shawn Hladky</a>
</p>
<p>
</p>
</div>
</div>
</body>
</html>
# |
Change |
User |
Description |
Committed |
|
#1
|
7709 |
Shawn Hladky |
P4.Net: Cleanup, documentation, and a a start for implementing an object-based output for filelog. |
|
|