Show / Hide Table of Contents

Class Services

Class to create new serivce instances.
This serves to ensure conflicting definitions of services don't get created.

Inheritance
System.Object
Services
Namespace: Oci.Common
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class Services : object

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
System.String serviceName

A unique service name.

System.String serviceEndpointPrefix

The endpoint prefix of the service.

System.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
System.String serviceName

service name.

Returns
Type Description
Service

A service instance.

In This Article
Back to top