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
IConfigurationsectionPrefix
string
AbstractServiceOptions(IConfigurationRoot, string)
protected AbstractServiceOptions(IConfigurationRoot root, string sectionPrefix = "")
Parameters
root
IConfigurationRootsectionPrefix
string
Properties
CONFIGURATION_PREFIX
public virtual string CONFIGURATION_PREFIX { get; protected set; }
Property Value
Label
Gets or sets a label describing the type of service
public string Label { get; set; }
Property Value
Name
Gets or sets the name of the service instance
public string Name { get; set; }
Property Value
Plan
Gets or sets a list of tags describing the service
public string Plan { get; set; }
Property Value
Services
public Dictionary<string, IEnumerable<Service>> Services { get; set; }
Property Value
Tags
Gets or sets the plan level at which the service is provisoned
public IEnumerable<string> Tags { get; set; }
Property Value
Methods
Bind(IConfiguration, string)
public void Bind(IConfiguration configuration, string serviceName)
Parameters
configuration
IConfigurationserviceName
string
GetInstancesOfType(string)
Retrieves a list of all service instances of a given service type
public IEnumerable<Service> GetInstancesOfType(string serviceType)
Parameters
serviceType
stringString 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