Table of Contents

Class AbstractServiceOptions

Namespace
Steeltoe.Extensions.Configuration
Assembly
Steeltoe.Extensions.Configuration.Abstractions.dll
public abstract class AbstractServiceOptions : AbstractOptions, IServicesInfo
Inheritance
AbstractServiceOptions
Implements
Derived
Inherited Members

Constructors

AbstractServiceOptions()

protected AbstractServiceOptions()

AbstractServiceOptions(IConfiguration, string)

protected AbstractServiceOptions(IConfiguration config, string sectionPrefix = "")

Parameters

config IConfiguration
sectionPrefix string

AbstractServiceOptions(IConfigurationRoot, string)

protected AbstractServiceOptions(IConfigurationRoot root, string sectionPrefix = "")

Parameters

root IConfigurationRoot
sectionPrefix string

Properties

CONFIGURATION_PREFIX

public virtual string CONFIGURATION_PREFIX { get; protected set; }

Property Value

string

Label

Gets or sets a label describing the type of service

public string Label { get; set; }

Property Value

string

Name

Gets or sets the name of the service instance

public string Name { get; set; }

Property Value

string

Plan

Gets or sets a list of tags describing the service

public string Plan { get; set; }

Property Value

string

Services

public Dictionary<string, IEnumerable<Service>> Services { get; set; }

Property Value

Dictionary<string, IEnumerable<Service>>

Tags

Gets or sets the plan level at which the service is provisoned

public IEnumerable<string> Tags { get; set; }

Property Value

IEnumerable<string>

Methods

Bind(IConfiguration, string)

public void Bind(IConfiguration configuration, string serviceName)

Parameters

configuration IConfiguration
serviceName string

GetInstancesOfType(string)

Retrieves a list of all service instances of a given service type

public IEnumerable<Service> GetInstancesOfType(string serviceType)

Parameters

serviceType string

String value that identifies the service type. May be platform/broker/version dependent

Returns

IEnumerable<Service>

A list of service instances configured under the given type

Remarks

Sample values include: p-mysql, azure-mysql-5-7, p-configserver, p.configserver

GetServicesList()

Retrieves a list of all service instances for all service types

public IEnumerable<Service> GetServicesList()

Returns

IEnumerable<Service>

A complete list of service instances known to the application