# Google.Cloud.Location - Class Locations (2.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.3.0/Google.Cloud.Location.Locations)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.2.0/Google.Cloud.Location.Locations)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.1.0/Google.Cloud.Location.Locations)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.0.0/Google.Cloud.Location.Locations)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/1.0.0/Google.Cloud.Location.Locations)

    public static class Locations

Reference documentation and code samples for the Google.Cloud.Location class Locations.

An abstract interface that provides location-related information for
a service. Service-specific metadata is provided through the
\[Location.metadata\]\[google.cloud.location.Location.metadata\] field.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Locations

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Location](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location)

## Assembly

Google.Cloud.Location.dll

## Methods

### BindService(LocationsBase)

    public static ServerServiceDefinition BindService(Locations.LocationsBase serviceImpl)

Creates service definition that can be registered with a server

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locationshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsBase` An object implementing the server-side handling logic. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerServiceDefinition.html` |   |

### BindService(ServiceBinderBase, LocationsBase)

    public static void BindService(ServiceBinderBase serviceBinder, Locations.LocationsBase serviceImpl)

Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `serviceBinder` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServiceBinderBase.html` Service methods will be bound by calling `AddMethod` on this object. |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locationshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsBase` An object implementing the server-side handling logic. |