Open sandboxFocus

Property UseDependencyInjection

UseDependencyInjection

Gets or sets a value indicating whether the ICachingService should be obtained through dependency injection. The default value is true. When set to false, the Default static property is used instead.

Declaration
public bool UseDependencyInjection { get; set; }
Property Value
Type Description
bool
Remarks

When dependency injection is enabled, the aspect introduces a dependency to ICachingService into the declaring type, which requires the type to be instantiated through a dependency injection container.

When dependency injection is disabled, static methods can also be cached.