Search Results for

    Show / Hide Table of Contents
    View Source

    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.Web.Common.DependencyInjection
    Assembly: Umbraco.Core.dll
    Syntax
    [Obsolete("Use Umbraco.Cms.Core.DependencyInjection.StaticServiceProvider directly instead - this is scheduled for removal in v13")]
    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 Source

    Instance

    The service locator.

    Declaration
    [Obsolete("Use Umbraco.Cms.Core.DependencyInjection.StaticServiceProvider directly instead- this is scheduled for removal in v13")]
    public static IServiceProvider Instance { get; set; }
    Property Value
    Type Description
    System.IServiceProvider
    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • Instance
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX