Perforce API for the .Net CLR P4.Net

P4Connection.Parse_Form�Method�

Parse the raw text of a Perforce form into a P4Form object

[Visual�Basic]
Public�Function�Parse_Form( _
���ByVal formCommand�As�String,�_
���ByVal formContents�As�String�_
)�As�P4Form
[C#]
public�P4Form�Parse_Form(
���stringformCommand,
���stringformContents
);

Parameters

formCommand
The form command.
formContents
Raw contents of the form spec.

Return Value

A P4Form object. The fields of the form can be read or updated. If you update a filed, you can save it with Save_Form.

Remarks

Forms are the things that pop-up in an editor when run from a command line. In P4.Net (and most other Perforce APIs), you do not need to parse/format the text manually. Instead, you can get/set the fields using the Fields and ArrayFields collections.

The following is a list of common form commands:

  • client
  • branch
  • label
  • job
  • user
  • group
  • protect
  • triggers
  • branch
  • When fetching or saving a form, do not use the '-o' and '-i' flags. P4.Net will automatically include them.

    See Also

    P4Connection Class | P4API Namespace