C# Класс 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.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Clone() публичный Метод

Creates a clone of this resource name, which is then independent of the original.
public Clone ( ) : ResourceName
Результат ResourceName

ResourceName() публичный Метод

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.
Результат System

ToString() публичный Метод

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
Результат string

this() публичный Метод

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.
Результат string

this() публичный Метод

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.
Результат string