IServiceConventionContext Interface

Summary

IServiceConventionContext Implements the IConventionContext
graph BT Type-.->Interface0["IConventionContext"] click Interface0 "/api/Rocket.Surgery.Conventions/IConventionContext" Type["IServiceConventionContext"] class Type type-node Implementing0["IServicesBuilder"]-.->Type click Implementing0 "/api/Rocket.Surgery.Extensions.DependencyInjection/IServicesBuilder" Implementing1["ServicesBuilder"]-.->Type click Implementing1 "/api/Rocket.Surgery.Extensions.DependencyInjection/ServicesBuilder" Implementing2["AutofacBuilder"]-.->Type click Implementing2 "/api/Rocket.Surgery.Extensions.Autofac/AutofacBuilder"

Syntax

public interface IServiceConventionContext : IConventionContext

Attributes

Type Description
NullableContextAttribute

Properties

Name Value Summary
AssemblyCandidateFinder IAssemblyCandidateFinder
Gets the assembly candidate finder.
AssemblyProvider IAssemblyProvider
Gets the assembly provider.
Configuration IConfiguration
Gets the configuration.
Environment IRocketEnvironment
The environment that this convention is running Based on IHostEnvironment / IHostingEnvironment
OnBuild IObservable<IServiceProvider>
Gets the on build.
Services IServiceCollection
Gets the services.

Extension Methods

Name Value Summary
Get<T>(string) T
Get a value by key from the context
Get<T>() T
Get a value by type from the context
GetOrAdd<T>(Func<T>) T
Get a value by key from the context
GetOrAdd<T>(string, Func<T>) T
Get a value by key from the context
IsUnitTestHost() bool
Check if this is a test host (to allow conventions to behave differently during unit tests)
Set<T>(string, T) void
Get a value by type from the context
Set<T>(T) void
Get a value by type from the context
SetBackingValue<IServiceConventionContext, TV>(Expression<Func<IServiceConventionContext, TV>>, TV) T
Sets the backing value.
UseMartenConnectionString(Func<NpgsqlConnection>) IServiceConventionContext
Uses marten.
UseMartenConnectionString(Func<string>) IServiceConventionContext
Uses marten.
UseMartenConnectionString(string) IServiceConventionContext
Uses marten.
UseMartenLightweightTracking() IServiceConventionContext
Uses marten.
UseMartenUnitOfWork() IServiceConventionContext
Uses marten.
UseMartenWithDirtyTracking() IServiceConventionContext
Uses marten.
UseMediatR(MediatRServiceConfiguration) IServiceConventionContext
Uses MediatR.
UseMediatR() IServiceConventionContext
Uses MediatR.
With<IServiceConventionContext, TKey, TField>(Dictionary<TKey, TField>, IDictionary<TKey, TField>) TBuilder
Adds the specified dictionary to the provided dictionary.
WithMarten() IServiceConventionContext
Withes the marten.

See Also