Interface IBuildsHostingEnvironment
A helper object which is used to activate optional/elective parts of the ZptSharp functionality.
Namespace: ZptSharp.Hosting
Assembly: ZptSharp.Abstractions.dll
Syntax
public interface IBuildsHostingEnvironment
Remarks
This object facilitates addition of services, similarly to the way in which a Microsoft.Extensions.DependencyInjection.IServiceCollection is used. It is intended for usage via its extension methods, each one performing a set of related set-up. Implementations of this hosting builder object are generally created in one of three ways:
- From the
ZptSharpServiceCollectionExtensions.AddZptSharp(IServiceCollection)
method - As a parameter to the constructor of an MVC View Engine
- As a parameter to the
ZptSharpHost.GetHost(System.Action<IBuildsHostingEnvironment>)
method
This object is used to set-up which parts of the ZptSharp functionality are activated, such as add-on packages like document providers and expression evaluators. Activating each piece of functionality is performed via an extension method to this interface. The absolute minimum required for a working ZptSharp environment is at least one activated document provider & at least one expression evaluator. A typical application might set that up as follows:
builder
.AddStandardZptExpressions()
.AddHapZptDocuments();
You are encouraged to read through the avaialble extension methods to discover what is available.
Properties
| Improve this Doc View SourceServiceCollection
Gets the service collection associated with the current builder.
Declaration
IServiceCollection ServiceCollection { get; }
Property Value
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
ServiceRegistry
Gets the service registry associated with the current builder.
Declaration
EnvironmentRegistry ServiceRegistry { get; }
Property Value
Type | Description |
---|---|
EnvironmentRegistry |