Click or drag to resize

ProtectionEntryExtensionsToServerCompatibleString Method (ProtectionMode)

Extension method which returns a string presentation of protection mode, which can be recognized by the server e.g. Write is translated to "write" and ReadRights to "=read". These are server compatible mode representations

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public static string ToServerCompatibleString(
	this ProtectionMode mode
)

Parameters

mode
Type: Perforce.P4ProtectionMode

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ProtectionMode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
To get string representation of protection mode instance
string readMode = ProtectionMode.Read.ToServerCompatibleString(); // returns "read"
string writeRightMode = ProtectionMode.WriteRights.ToServerCompatibleString(); // returns "=write"
See Also