SaaS CMS has officially launched! Learn more now.

Class OptionsAttribute

Attribute used to declaratively define that a class should be registered in IOC container as an option

Inheritance
System.Object
OptionsAttribute
Namespace: EPiServer.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public sealed class OptionsAttribute : ServicePlugInAttributeBase, IServiceConfiguration

Constructors

OptionsAttribute()

Initializes a new instance of the OptionsAttribute class.

Declaration
public OptionsAttribute()

Properties

ConfigurationSection

Define name of Configuration section in appsetting.

Declaration
public string ConfigurationSection { get; set; }
Property Value
Type Description
System.String

Lifecycle

Gets the scope of instances of the attributed class, i.e. when to reuse instances of the same service.

Declaration
public override ServiceInstanceScope Lifecycle { get; }
Property Value
Type Description
ServiceInstanceScope
Overrides

Implements

Extension Methods