Class ServiceHostConfiguration
A class representing a configuration for the service environment for the application.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public sealed class ServiceHostConfiguration
Properties
SystemOverrideEnvironmentVariableName
The environment variable key for the service environment override.
Declaration
public static string SystemOverrideEnvironmentVariableName { get; }
Property Value
Type | Description |
---|---|
String |
Methods
GetServiceAddress(ServiceEnvironment, ServiceRegionUtils.Provider, String, Int32, ServiceProtocol, String)
Returns the service address for the specified inputs.
Declaration
public string GetServiceAddress(ServiceEnvironment environmentOverride, ServiceRegionUtils.Provider regionProvider, string subdomain, int port, ServiceProtocol protocol, string serviceName)
Parameters
Type | Name | Description |
---|---|---|
ServiceEnvironment | environmentOverride | The service environment override. |
ServiceRegionUtils.Provider | regionProvider | The region provider. |
String | subdomain | The service subdomain. |
Int32 | port | The service port. |
ServiceProtocol | protocol | The web protocol. |
String | serviceName | The service's name. |
Returns
Type | Description |
---|---|
String | The service address. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | |
ArgumentOutOfRangeException |
GetServiceAddress(ServiceEnvironment, ServiceRegionUtils.Provider, ServiceProtocol, String)
Returns the service address for the specified inputs.
Declaration
public string GetServiceAddress(ServiceEnvironment environmentOverride, ServiceRegionUtils.Provider regionProvider, ServiceProtocol protocol = ServiceProtocol.Http, string serviceName = "project")
Parameters
Type | Name | Description |
---|---|---|
ServiceEnvironment | environmentOverride | The service environment override. |
ServiceRegionUtils.Provider | regionProvider | The region provider. |
ServiceProtocol | protocol | The web protocol. |
String | serviceName | The service's name. |
Returns
Type | Description |
---|---|
String | The service address. |
GetServiceAddress(ServiceProtocol, String)
Returns the service address for the specified inputs.
Declaration
public string GetServiceAddress(ServiceProtocol protocol = ServiceProtocol.Http, string serviceName = "project")
Parameters
Type | Name | Description |
---|---|---|
ServiceProtocol | protocol | The web protocol. |
String | serviceName | The service's name. |
Returns
Type | Description |
---|---|
String | The service address. |
GetServiceAddress(ServiceRegionUtils.Provider, ServiceProtocol, String)
Returns the service address for the specified inputs.
Declaration
public string GetServiceAddress(ServiceRegionUtils.Provider regionProvider, ServiceProtocol protocol = ServiceProtocol.Http, string serviceName = "project")
Parameters
Type | Name | Description |
---|---|---|
ServiceRegionUtils.Provider | regionProvider | The region provider. |
ServiceProtocol | protocol | The web protocol. |
String | serviceName | The service's name. |
Returns
Type | Description |
---|---|
String | The service address. |
ResolveEnvironment(Nullable<ServiceEnvironment>)
Returns the service address for the specified inputs.
Declaration
public (ServiceEnvironment environment, string url) ResolveEnvironment(ServiceEnvironment? environmentOverride = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<ServiceEnvironment> | environmentOverride | The service environment override. |
Returns
Type | Description |
---|---|
(T1, T2)<ServiceEnvironment, String> | The resolved environment and url. |
Exceptions
Type | Condition |
---|---|
NotSupportedException |