C# Class Google.Api.Gax.ResourceName

Class for representing and working with resource names.

A resource name is represented by a PathTemplate, an assignment of resource IDs to parameters in the template, and an optional service name. This class allows the service name and resource IDs to be modified, but only within the same template.

Afficher le fichier Open project: googleapis/gax-dotnet Class Usage Examples

Méthodes publiques

Méthode Description
Clone ( ) : ResourceName

Creates a clone of this resource name, which is then independent of the original.

ResourceName ( PathTemplate template ) : System

Creates a resource name with the given template and resource IDs. The resource IDs are cloned, so later changes to resourceIds are ignored. This constructor does not populate the ServiceName property, but that can be set after construction.

ToString ( ) : string

Returns a string representation of this resource name, expanding the template parameters with the resource IDs and prepending the service name (if present).

this ( int index ) : string

Gets or sets the identifier for the specified parameter index.

this ( string parameterName ) : string

Gets or sets the identifier for the specified parameter name.

Private Methods

Méthode Description
CreateWithShallowCopy ( PathTemplate template, string serviceName, string resourceIds ) : ResourceName
GetParameterIndex ( string parameterName ) : int
ResourceName ( PathTemplate template, string serviceName, string resourceIds, bool ignored ) : System

Private constructor used by internal code to avoid repeated cloning and validation.

Method Details

Clone() public méthode

Creates a clone of this resource name, which is then independent of the original.
public Clone ( ) : ResourceName
Résultat ResourceName

ResourceName() public méthode

Creates a resource name with the given template and resource IDs. The resource IDs are cloned, so later changes to resourceIds are ignored. This constructor does not populate the ServiceName property, but that can be set after construction.
public ResourceName ( PathTemplate template ) : System
template PathTemplate The template for the new resource name. Must not be null.
Résultat System

ToString() public méthode

Returns a string representation of this resource name, expanding the template parameters with the resource IDs and prepending the service name (if present).
public ToString ( ) : string
Résultat string

this() public méthode

Gets or sets the identifier for the specified parameter index.
public this ( int index ) : string
index int The index of the parameter value to retrieve.
Résultat string

this() public méthode

Gets or sets the identifier for the specified parameter name.
public this ( string parameterName ) : string
parameterName string The name of the parameter value to retrieve.
Résultat string