Description
The FormatIdent
method is a static utility function within the Sandbox.Package
class. It is used to format a package identifier string based on the provided organization, package name, version, and locality. This method is useful for generating a standardized identifier string that can be used to uniquely identify a package within the Sandbox environment.
Usage
To use the FormatIdent
method, provide the following parameters:
org
(System.String): The organization name associated with the package.
package
(System.String): The name of the package.
version
(System.Nullable<System.Int32>): The version number of the package. This can be null if the version is not specified.
local
(System.Boolean): A boolean indicating whether the package is local or remote.
The method returns a System.String
that represents the formatted package identifier.
Example
// Example usage of the FormatIdent method
string org = "myorg";
string package = "mypackage";
int? version = 1;
bool local = true;
string formattedIdent = Sandbox.Package.FormatIdent(org, package, version, local);
// formattedIdent will be something like "myorg/mypackage@1:local"