Click or drag to resize

P4Server Class

P4Server Represents the connection to a Perforce Server using the the P4 Bridge DLL. It wraps the calls exported by the DLL and transforms the data types exported by the DLL as native C#.NET data types.
P4Server Represents the connection to a Perforce Server using the the P4 Bridge DLL. It wraps the calls exported by the DLL and transforms the data types exported by the DLL as native C#.NET data types.
Inheritance Hierarchy
SystemObject
  Perforce.P4P4Server

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public class P4Server : IDisposable

The P4Server type exposes the following members.

Constructors
  NameDescription
Public methodP4Server(String)
Create a P4BridgeServer using the PUC specified by the environment or a p4config file if one exists.
Public methodP4Server(String, String, String, String)
Create a P4BridgeServer used to connect to the specified P4Server
Public methodP4Server(String, String, String, String, String, String, String)
Create a P4BridgeServer used to connect to the specified P4Server
Top
Properties
  NameDescription
Public propertyApiLevel
What API level does the server support
Public propertyCharacterSet
The character set used by the connection
Public propertyClient
The client workspace used by the connection
Public propertyConfig
The config file used by the connection
Public propertyConnectionError
Get the error message generated by the previous connection (if any) from the bridge dll.
Public propertyStatic memberConnectionErrorInt
Get the error message generated by the previous connection (if any)
Public propertyCurrentWorkingDirectory
The current working directory (cwd) used by the p4 server
Public propertyKeepAlive
Public propertyLastResults
The results of the last command executed on this thread
Public propertyPassword
The user's password used by the connection
Public propertyPort
The hostname:port used by the connection
Public propertyProgramName
The program name used by the connection
Public propertyProgramVersion
The program version used by the connection
Public propertyRequiresLogin
The server requires a client to use the login command to pass credentials.
Public propertyRunCmdTimout Obsolete.
Public propertyUser
The user name used by the connection
Public propertyUseUnicode
Need to use Unicode when marshalling to/from the P4 server
Public propertyStatic memberVersion
Get the version of the p4.net assembly
Top
Methods
  NameDescription
Public methodCancelCommand
Cancel a running command
Public methodClose
Close the connection to a P4 Server
Public methodStatic memberConnectionInfoFromPath
Public methodContinueRunCmdTimer
Public methodDisconnect
Public methodDispose
For IDispose
Public methodDispose(Boolean)
Releases the unmanaged resources used by the P4Server and optionally releases the managed resources
Public methodEchoCommand(String)
Broadcast a string on the CommandEcho event
Public methodEchoCommand(String, StringList)
Broadcast a the command line (cmd and args) on the CommandEcho event
Public methodEchoResponseTime
Broadcast a the command line (cmd, args and response time) on the ResponseTimeEcho event
Public methodEquals (Inherited from Object.)
Protected methodFinalize
Finalizer
(Overrides ObjectFinalize.)
Public methodStatic memberGet
Get an environment setting used by the server, such as user, client, ..
Public methodGetBinaryResults
Get the complete binary results for the last command
Public methodgetCmdId
Public methodStatic memberGetConfig
The config file that will be used by a given directory
Public methodGetDataSet
Public methodStatic memberGetEnvironmentTicketFile
Use the C++ API to determine the path of the ticket file set in the environment
Public methodGetErrorResults
Get a list of errors (if any) generated by a command
Public methodGetHashCode (Inherited from Object.)
Public methodGetInfoResults
Get the information messages generated by the previous command
Public methodGetParallelOperationCount
Mostly for testing, provide a way to tell if a parallel operation has started
Public methodGetTaggedOutput
Get the tagged output generated by a command
Public methodGetTextResults
Get the complete text results for the last command
Public methodStatic memberGetTicket(String, String)
Use the C++ API to find an existing ticket if a file will be ignored
Public methodGetTicket(String, String, String)
Use the C++ API to get the ticket
Public methodGetTicketFile
Use the C++ API to determine the path of the ticket file for the current connection
Public methodStatic memberGetTicketFileCredential
Use the C++ API to find an existing ticket if a file will be ignored
Public methodGetType (Inherited from Object.)
Public methodIsCommandPaused
Public methodIsConnected
Public methodStatic memberIsIgnored
Use the C++ API to determine if a file will be ignored
Public methodLogin
Run a login command on the server
Public methodLogout
Run a logout command on the server
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPauseRunCmdTimer
Public methodReconnect
Reconnect to the server in the event the connection is lost
Public methodRunCommand
Run a P4 command on the P4 Server
Public methodStatic memberSet
Set an environment setting used by the server, such as user, client, ..
Public methodSetConnectionData
The parameters used by the connection
Public methodSetDataSet
The data set for use by a command
Public methodStatic memberSetDebugLevel(String)
Set client debug level for things like "rpc=3" Output goes to stdout
Public methodStatic memberSetDebugLevel(String, String)
Set client debug level for things like "rpc=3" Output goes to specified log file
Public methodSetProtocol
Public methodSetThreadOwner
Public methodSetTicketFile
Use the C++ API to set the path of the ticket file
Public methodToString (Inherited from Object.)
Public methodStatic memberUpdate
Update an environment setting used by the server, such as user, client, .. Makes a local only change which overrides registry, environment etc... And does not get written into the registry or the environment use "null" value to remove an existing Update setting.
Public methodUrlHandled
Top
Events
  NameDescription
Public eventBinaryResultsReceived
Broadcast event for binary data
Public eventCommandEcho
Broadcast event for text results
Public eventErrorReceived
Broadcast errors received
Public eventInfoResultsReceived
Broadcast event for info results
Public eventResponseTimeEcho
Broadcast event for text results
Public eventTaggedOutputReceived
Event to broadcast tagged output
Public eventTextResultsReceived
Broadcast event for text results
Top
Fields
  NameDescription
Public fieldIdleDisconnectWaitTime
Public fieldKeepAliveDelay
Time for a command to run before allowing the client/user to cancel;
Public fieldPromptHandler
Delegate used to process prompts for input from the server.
Public fieldResolveAHandler
Delegate used to provide a custom handler for Resolve callbacks passing a ClientResolve object from the p4api.
Public fieldResolveHandler
Delegate used to provide a custom handler for Resolve callbacks passing a ClientMerge object from the p4api.
Public fieldRunCmdTimeout
Top
Remarks
This file contains the internal data a methods that are not part of the public interface
See Also