Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

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