Include Options classes in the Public API

Fixed in

EPiServer.CMS.Core 11.2.0

Created

Oct 19, 2017

Updated

Dec 05, 2017

Area

CMS Core

State

Closed, Fixed


Description

Options classes were added to the CMS Core packages as a way of separating the storage of settings, usually in a configuration file in the form of web.config, from their usage in services. This allows for a cleaner separation of concerns and enables support for .NET Standard.

All Options classes are registered in the service container and can a such be accessed by adding a constructor dependency to your service or MVC controller.

These Option classes were previously accessible in various Internal namespaces, but has now been reviewed and moved to the Public API.

Notable Options classes:

  • EPiServer.Data.DataAccessOptions
  • EPiServer.Core.ContentOptions
  • EPiServer.Framework.EnvironmentOptions
  • EPiServer.Framework.Blobs.BlobOptions
  • EPiServer.Framework.Localization.LocalizationOptions
  • EPiServer.Web.UrlSegmentOptions