Click or drag to resize

RepositoryGetLabel Method (String, String, Options)

Get the record for an existing label from the repository.

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public Label GetLabel(
	string label,
	string template,
	Options options
)

Parameters

label
Type: SystemString
Label name
template
Type: SystemString
Template to use (if required)
options
Type: Perforce.P4Options
Flags used when fetching an existing label

Return Value

Type: Label
The Label object if label was found, null if creation failed
Examples
To get the admin_label with the gobal option:
LabelCmdOptions opts = new LabelCmdOptions(LabelCmdFlags.Global,null);
Label label = rep.GetLabel("admin_label", null, opts);
See Also