Parses a Perforce form without making a server connection.

Namespace:  P4API
Assembly:  p4api (in p4api)
Version: 1.0.0.0 (1.0.0)

Syntax

C#
public static P4Form LoadFromSpec(
	string formCommand,
	string specDef,
	string formContents,
	Encoding encoding
)

Parameters

formCommand
Type: System..::.String
The command that would otherwise be used to fetch the form.
specDef
Type: System..::.String
The Perforce 'specdef' for the form.
formContents
Type: System..::.String
The raw formated form text.
encoding
Type: System.Text..::.Encoding
Server encoding (either ANSI or UFT-8).

Return Value

A Perforce form object.

Remarks

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.

See Also