Get the record for an existing label from the repository.
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public Label GetLabel( string label, string template, Options options ) |
Visual Basic |
---|
Public Function GetLabel ( _ label As String, _ template As String, _ options As Options _ ) As Label |
Visual C++ |
---|
public: Label^ GetLabel( String^ label, String^ template, Options^ options ) |
Parameters
- label
- Type: System..::..String
Label name
- template
- Type: System..::..String
- options
- Type: Perforce.P4..::..Options
Flags used when fetching an existing label
Return Value
The Label object if label was found, null if creation failed
Examples
To get the admin_label with the gobal option:
CopyC#

LabelCmdOptions opts = new LabelCmdOptions(LabelCmdFlags.Global,null); Label label = rep.GetLabel("admin_label", null, opts);