Table of Contents

Class OpenShellServiceCollectionExtensions

Namespace
Microsoft.Extensions.DependencyInjection
Assembly
OpenShell.Sdk.DependencyInjection.dll

Registers the OpenShell client with IServiceCollection.

public static class OpenShellServiceCollectionExtensions
Inheritance
OpenShellServiceCollectionExtensions
Inherited Members

Methods

AddOpenShell(IServiceCollection, IConfiguration)

Registers the default gateway, binding OpenShellOptions from configuration.

public static IServiceCollection AddOpenShell(this IServiceCollection services, IConfiguration configuration)

Parameters

services IServiceCollection
configuration IConfiguration

Returns

IServiceCollection

AddOpenShell(IServiceCollection, Action<OpenShellOptions>)

Registers the default gateway, configured in code.

public static IServiceCollection AddOpenShell(this IServiceCollection services, Action<OpenShellOptions> configure)

Parameters

services IServiceCollection
configure Action<OpenShellOptions>

Returns

IServiceCollection

AddOpenShell(IServiceCollection, string, IConfiguration)

Registers a named gateway, binding OpenShellOptions from configuration.

public static IServiceCollection AddOpenShell(this IServiceCollection services, string name, IConfiguration configuration)

Parameters

services IServiceCollection
name string
configuration IConfiguration

Returns

IServiceCollection

AddOpenShell(IServiceCollection, string, Action<OpenShellOptions>)

Registers a named gateway, configured in code.

public static IServiceCollection AddOpenShell(this IServiceCollection services, string name, Action<OpenShellOptions> configure)

Parameters

services IServiceCollection
name string
configure Action<OpenShellOptions>

Returns

IServiceCollection

AddOpenShell(IServiceCollection, string, Action<IServiceProvider, OpenShellOptions>)

Registers a named gateway whose options need other services, for example a token cache or secret store that supplies Auth.

public static IServiceCollection AddOpenShell(this IServiceCollection services, string name, Action<IServiceProvider, OpenShellOptions> configure)

Parameters

services IServiceCollection
name string
configure Action<IServiceProvider, OpenShellOptions>

Returns

IServiceCollection