Search Results for

    Show / Hide Table of Contents
    View Source

    Class ServiceContext

    Represents the Umbraco Service context, which provides access to all services.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class ServiceContext

    Constructors

    View Source

    ServiceContext(Nullable<Lazy<IPublicAccessService>>, Nullable<Lazy<IDomainService>>, Nullable<Lazy<IAuditService>>, Nullable<Lazy<ILocalizedTextService>>, Nullable<Lazy<ITagService>>, Nullable<Lazy<IContentService>>, Nullable<Lazy<IUserService>>, Nullable<Lazy<IMemberService>>, Nullable<Lazy<IMediaService>>, Nullable<Lazy<IContentTypeService>>, Nullable<Lazy<IMediaTypeService>>, Nullable<Lazy<IDataTypeService>>, Nullable<Lazy<IFileService>>, Nullable<Lazy<ILocalizationService>>, Nullable<Lazy<IPackagingService>>, Nullable<Lazy<IServerRegistrationService>>, Nullable<Lazy<IEntityService>>, Nullable<Lazy<IRelationService>>, Nullable<Lazy<IMemberTypeService>>, Nullable<Lazy<IMemberGroupService>>, Nullable<Lazy<INotificationService>>, Nullable<Lazy<IExternalLoginWithKeyService>>, Nullable<Lazy<IRedirectUrlService>>, Nullable<Lazy<IConsentService>>, Nullable<Lazy<IKeyValueService>>, Nullable<Lazy<IContentTypeBaseServiceProvider>>, Nullable<Lazy<IWebhookService>>)

    Initializes a new instance of the ServiceContext class with lazy services.

    Declaration
    public ServiceContext(Lazy<IPublicAccessService>? publicAccessService, Lazy<IDomainService>? domainService, Lazy<IAuditService>? auditService, Lazy<ILocalizedTextService>? localizedTextService, Lazy<ITagService>? tagService, Lazy<IContentService>? contentService, Lazy<IUserService>? userService, Lazy<IMemberService>? memberService, Lazy<IMediaService>? mediaService, Lazy<IContentTypeService>? contentTypeService, Lazy<IMediaTypeService>? mediaTypeService, Lazy<IDataTypeService>? dataTypeService, Lazy<IFileService>? fileService, Lazy<ILocalizationService>? localizationService, Lazy<IPackagingService>? packagingService, Lazy<IServerRegistrationService>? serverRegistrationService, Lazy<IEntityService>? entityService, Lazy<IRelationService>? relationService, Lazy<IMemberTypeService>? memberTypeService, Lazy<IMemberGroupService>? memberGroupService, Lazy<INotificationService>? notificationService, Lazy<IExternalLoginWithKeyService>? externalLoginService, Lazy<IRedirectUrlService>? redirectUrlService, Lazy<IConsentService>? consentService, Lazy<IKeyValueService>? keyValueService, Lazy<IContentTypeBaseServiceProvider>? contentTypeBaseServiceProvider, Lazy<IWebhookService>? webhookService)
    Parameters
    Type Name Description
    System.Nullable<Lazy<IPublicAccessService>> publicAccessService
    System.Nullable<Lazy<IDomainService>> domainService
    System.Nullable<Lazy<IAuditService>> auditService
    System.Nullable<Lazy<ILocalizedTextService>> localizedTextService
    System.Nullable<Lazy<ITagService>> tagService
    System.Nullable<Lazy<IContentService>> contentService
    System.Nullable<Lazy<IUserService>> userService
    System.Nullable<Lazy<IMemberService>> memberService
    System.Nullable<Lazy<IMediaService>> mediaService
    System.Nullable<Lazy<IContentTypeService>> contentTypeService
    System.Nullable<Lazy<IMediaTypeService>> mediaTypeService
    System.Nullable<Lazy<IDataTypeService>> dataTypeService
    System.Nullable<Lazy<IFileService>> fileService
    System.Nullable<Lazy<ILocalizationService>> localizationService
    System.Nullable<Lazy<IPackagingService>> packagingService
    System.Nullable<Lazy<IServerRegistrationService>> serverRegistrationService
    System.Nullable<Lazy<IEntityService>> entityService
    System.Nullable<Lazy<IRelationService>> relationService
    System.Nullable<Lazy<IMemberTypeService>> memberTypeService
    System.Nullable<Lazy<IMemberGroupService>> memberGroupService
    System.Nullable<Lazy<INotificationService>> notificationService
    System.Nullable<Lazy<IExternalLoginWithKeyService>> externalLoginService
    System.Nullable<Lazy<IRedirectUrlService>> redirectUrlService
    System.Nullable<Lazy<IConsentService>> consentService
    System.Nullable<Lazy<IKeyValueService>> keyValueService
    System.Nullable<Lazy<IContentTypeBaseServiceProvider>> contentTypeBaseServiceProvider
    System.Nullable<Lazy<IWebhookService>> webhookService

    Properties

    View Source

    AuditService

    Gets the IAuditService

    Declaration
    public IAuditService AuditService { get; }
    Property Value
    Type Description
    IAuditService
    View Source

    ConsentService

    Gets the ConsentService.

    Declaration
    public IConsentService ConsentService { get; }
    Property Value
    Type Description
    IConsentService
    View Source

    ContentService

    Gets the IContentService

    Declaration
    public IContentService ContentService { get; }
    Property Value
    Type Description
    IContentService
    View Source

    ContentTypeBaseServices

    Gets the ContentTypeServiceBaseFactory.

    Declaration
    public IContentTypeBaseServiceProvider ContentTypeBaseServices { get; }
    Property Value
    Type Description
    IContentTypeBaseServiceProvider
    View Source

    ContentTypeService

    Gets the IContentTypeService

    Declaration
    public IContentTypeService ContentTypeService { get; }
    Property Value
    Type Description
    IContentTypeService
    View Source

    DataTypeService

    Gets the IDataTypeService

    Declaration
    public IDataTypeService DataTypeService { get; }
    Property Value
    Type Description
    IDataTypeService
    View Source

    DomainService

    Gets the IDomainService

    Declaration
    public IDomainService DomainService { get; }
    Property Value
    Type Description
    IDomainService
    View Source

    EntityService

    Gets the IEntityService

    Declaration
    public IEntityService EntityService { get; }
    Property Value
    Type Description
    IEntityService
    View Source

    ExternalLoginService

    Gets the ExternalLoginService.

    Declaration
    public IExternalLoginWithKeyService ExternalLoginService { get; }
    Property Value
    Type Description
    IExternalLoginWithKeyService
    View Source

    FileService

    Gets the IFileService

    Declaration
    public IFileService FileService { get; }
    Property Value
    Type Description
    IFileService
    View Source

    KeyValueService

    Gets the KeyValueService.

    Declaration
    public IKeyValueService KeyValueService { get; }
    Property Value
    Type Description
    IKeyValueService
    View Source

    LocalizationService

    Gets the ILocalizationService

    Declaration
    public ILocalizationService LocalizationService { get; }
    Property Value
    Type Description
    ILocalizationService
    View Source

    MediaService

    Gets the IMediaService

    Declaration
    public IMediaService MediaService { get; }
    Property Value
    Type Description
    IMediaService
    View Source

    MediaTypeService

    Gets the IMediaTypeService

    Declaration
    public IMediaTypeService MediaTypeService { get; }
    Property Value
    Type Description
    IMediaTypeService
    View Source

    MemberGroupService

    Gets the MemberGroupService

    Declaration
    public IMemberGroupService MemberGroupService { get; }
    Property Value
    Type Description
    IMemberGroupService
    View Source

    MemberService

    Gets the MemberService

    Declaration
    public IMemberService MemberService { get; }
    Property Value
    Type Description
    IMemberService
    View Source

    MemberTypeService

    Gets the MemberTypeService

    Declaration
    public IMemberTypeService MemberTypeService { get; }
    Property Value
    Type Description
    IMemberTypeService
    View Source

    NotificationService

    Gets the INotificationService

    Declaration
    public INotificationService NotificationService { get; }
    Property Value
    Type Description
    INotificationService
    View Source

    PackagingService

    Gets the PackagingService

    Declaration
    public IPackagingService PackagingService { get; }
    Property Value
    Type Description
    IPackagingService
    View Source

    PublicAccessService

    Gets the IPublicAccessService

    Declaration
    public IPublicAccessService PublicAccessService { get; }
    Property Value
    Type Description
    IPublicAccessService
    View Source

    RedirectUrlService

    Gets the RedirectUrlService.

    Declaration
    public IRedirectUrlService RedirectUrlService { get; }
    Property Value
    Type Description
    IRedirectUrlService
    View Source

    RelationService

    Gets the IRelationService

    Declaration
    public IRelationService RelationService { get; }
    Property Value
    Type Description
    IRelationService
    View Source

    ServerRegistrationService

    Gets the ServerRegistrationService

    Declaration
    public IServerRegistrationService ServerRegistrationService { get; }
    Property Value
    Type Description
    IServerRegistrationService
    View Source

    TagService

    Gets the ITagService

    Declaration
    public ITagService TagService { get; }
    Property Value
    Type Description
    ITagService
    View Source

    TextService

    Gets the ILocalizedTextService

    Declaration
    public ILocalizedTextService TextService { get; }
    Property Value
    Type Description
    ILocalizedTextService
    View Source

    UserService

    Gets the UserService

    Declaration
    public IUserService UserService { get; }
    Property Value
    Type Description
    IUserService
    View Source

    WebhookService

    Gets the WebhookService.

    Declaration
    public IWebhookService WebhookService { get; }
    Property Value
    Type Description
    IWebhookService

    Methods

    View Source

    CreatePartial(IContentService, IMediaService, IContentTypeService, IMediaTypeService, IDataTypeService, IFileService, ILocalizationService, IPackagingService, IEntityService, IRelationService, IMemberGroupService, IMemberTypeService, IMemberService, IUserService, ITagService, INotificationService, ILocalizedTextService, IAuditService, IDomainService, IPublicAccessService, IExternalLoginWithKeyService, IServerRegistrationService, IRedirectUrlService, IConsentService, IKeyValueService, IContentTypeBaseServiceProvider, IWebhookService)

    Creates a partial service context with only some services (for tests).

    Declaration
    public static ServiceContext CreatePartial(IContentService contentService = null, IMediaService mediaService = null, IContentTypeService contentTypeService = null, IMediaTypeService mediaTypeService = null, IDataTypeService dataTypeService = null, IFileService fileService = null, ILocalizationService localizationService = null, IPackagingService packagingService = null, IEntityService entityService = null, IRelationService relationService = null, IMemberGroupService memberGroupService = null, IMemberTypeService memberTypeService = null, IMemberService memberService = null, IUserService userService = null, ITagService tagService = null, INotificationService notificationService = null, ILocalizedTextService localizedTextService = null, IAuditService auditService = null, IDomainService domainService = null, IPublicAccessService publicAccessService = null, IExternalLoginWithKeyService externalLoginService = null, IServerRegistrationService serverRegistrationService = null, IRedirectUrlService redirectUrlService = null, IConsentService consentService = null, IKeyValueService keyValueService = null, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider = null, IWebhookService webhookService = null)
    Parameters
    Type Name Description
    IContentService contentService
    IMediaService mediaService
    IContentTypeService contentTypeService
    IMediaTypeService mediaTypeService
    IDataTypeService dataTypeService
    IFileService fileService
    ILocalizationService localizationService
    IPackagingService packagingService
    IEntityService entityService
    IRelationService relationService
    IMemberGroupService memberGroupService
    IMemberTypeService memberTypeService
    IMemberService memberService
    IUserService userService
    ITagService tagService
    INotificationService notificationService
    ILocalizedTextService localizedTextService
    IAuditService auditService
    IDomainService domainService
    IPublicAccessService publicAccessService
    IExternalLoginWithKeyService externalLoginService
    IServerRegistrationService serverRegistrationService
    IRedirectUrlService redirectUrlService
    IConsentService consentService
    IKeyValueService keyValueService
    IContentTypeBaseServiceProvider contentTypeBaseServiceProvider
    IWebhookService webhookService
    Returns
    Type Description
    ServiceContext
    Remarks

    Using a true constructor for this confuses DI containers.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ServiceContext(Nullable<Lazy<IPublicAccessService>>, Nullable<Lazy<IDomainService>>, Nullable<Lazy<IAuditService>>, Nullable<Lazy<ILocalizedTextService>>, Nullable<Lazy<ITagService>>, Nullable<Lazy<IContentService>>, Nullable<Lazy<IUserService>>, Nullable<Lazy<IMemberService>>, Nullable<Lazy<IMediaService>>, Nullable<Lazy<IContentTypeService>>, Nullable<Lazy<IMediaTypeService>>, Nullable<Lazy<IDataTypeService>>, Nullable<Lazy<IFileService>>, Nullable<Lazy<ILocalizationService>>, Nullable<Lazy<IPackagingService>>, Nullable<Lazy<IServerRegistrationService>>, Nullable<Lazy<IEntityService>>, Nullable<Lazy<IRelationService>>, Nullable<Lazy<IMemberTypeService>>, Nullable<Lazy<IMemberGroupService>>, Nullable<Lazy<INotificationService>>, Nullable<Lazy<IExternalLoginWithKeyService>>, Nullable<Lazy<IRedirectUrlService>>, Nullable<Lazy<IConsentService>>, Nullable<Lazy<IKeyValueService>>, Nullable<Lazy<IContentTypeBaseServiceProvider>>, Nullable<Lazy<IWebhookService>>)
    • Properties
      • AuditService
      • ConsentService
      • ContentService
      • ContentTypeBaseServices
      • ContentTypeService
      • DataTypeService
      • DomainService
      • EntityService
      • ExternalLoginService
      • FileService
      • KeyValueService
      • LocalizationService
      • MediaService
      • MediaTypeService
      • MemberGroupService
      • MemberService
      • MemberTypeService
      • NotificationService
      • PackagingService
      • PublicAccessService
      • RedirectUrlService
      • RelationService
      • ServerRegistrationService
      • TagService
      • TextService
      • UserService
      • WebhookService
    • Methods
      • CreatePartial(IContentService, IMediaService, IContentTypeService, IMediaTypeService, IDataTypeService, IFileService, ILocalizationService, IPackagingService, IEntityService, IRelationService, IMemberGroupService, IMemberTypeService, IMemberService, IUserService, ITagService, INotificationService, ILocalizedTextService, IAuditService, IDomainService, IPublicAccessService, IExternalLoginWithKeyService, IServerRegistrationService, IRedirectUrlService, IConsentService, IKeyValueService, IContentTypeBaseServiceProvider, IWebhookService)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX