Class StaticServiceProvider
Service locator for internal (umbraco cms) only purposes. Should only be used if no other ways exist.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.DependencyInjection
Assembly: Umbraco.Core.dll
Syntax
public static class StaticServiceProvider
Remarks
It is created with only two goals in mind 1) Continue to have the same extension methods on IPublishedContent and IPublishedElement as in V8. To make migration easier. 2) To have a tool to avoid breaking changes in minor and patch versions. All methods using this should in theory be obsolete. Keep in mind, every time this is used, the code becomes basically untestable.
Properties
View SourceInstance
The service locator.
Declaration
public static IServiceProvider Instance { get; set; }
Property Value
Type | Description |
---|---|
IServiceProvider |