Class Services
Class to create new serivce instances.
This serves to ensure conflicting definitions of services don't get created.
Inherited Members
Namespace: Oci.Common
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class Services
Methods
Create(string, string, string)
Create a new service definition. If the service has already been registered with different values, an ArgumentException will be raised. If the service has already been registered, the existing definition will be returned.
Declaration
public static Service Create(string serviceName, string serviceEndpointPrefix, string serviceEndpointTemplate)
Parameters
Type | Name | Description |
---|---|---|
string | serviceName | A unique service name. |
string | serviceEndpointPrefix | The endpoint prefix of the service. |
string | serviceEndpointTemplate | The endpoint template of the service. |
Returns
Type | Description |
---|---|
Service | The service instance created, or existing service instance if found. |
GetServiceByName(string)
Get Service instance based on service name.
Declaration
public static Service GetServiceByName(string serviceName)
Parameters
Type | Name | Description |
---|---|---|
string | serviceName | service name. |
Returns
Type | Description |
---|---|
Service | A service instance. |