Search Results for

    Show / Hide Table of Contents
    View Source

    Class ServiceContext

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

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

    Constructors

    View Source

    ServiceContext(Lazy<IPublicAccessService>?, Lazy<IDomainService>?, Lazy<IAuditService>?, Lazy<ILocalizedTextService>?, Lazy<ITagService>?, Lazy<IContentService>?, Lazy<IUserService>?, Lazy<IMemberService>?, Lazy<IMediaService>?, Lazy<IContentTypeService>?, Lazy<IMediaTypeService>?, Lazy<IDataTypeService>?, Lazy<IFileService>?, Lazy<ILocalizationService>?, Lazy<IPackagingService>?, Lazy<IServerRegistrationService>?, Lazy<IEntityService>?, Lazy<IRelationService>?, Lazy<IMemberTypeService>?, Lazy<IMemberGroupService>?, Lazy<INotificationService>?, Lazy<IExternalLoginWithKeyService>?, Lazy<IRedirectUrlService>?, Lazy<IConsentService>?, Lazy<IKeyValueService>?, Lazy<IContentTypeBaseServiceProvider>?, 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
    Lazy<IPublicAccessService> publicAccessService

    The public access service.

    Lazy<IDomainService> domainService

    The domain service.

    Lazy<IAuditService> auditService

    The audit service.

    Lazy<ILocalizedTextService> localizedTextService

    The localized text service.

    Lazy<ITagService> tagService

    The tag service.

    Lazy<IContentService> contentService

    The content service.

    Lazy<IUserService> userService

    The user service.

    Lazy<IMemberService> memberService

    The member service.

    Lazy<IMediaService> mediaService

    The media service.

    Lazy<IContentTypeService> contentTypeService

    The content type service.

    Lazy<IMediaTypeService> mediaTypeService

    The media type service.

    Lazy<IDataTypeService> dataTypeService

    The data type service.

    Lazy<IFileService> fileService

    The file service.

    Lazy<ILocalizationService> localizationService

    The localization service.

    Lazy<IPackagingService> packagingService

    The packaging service.

    Lazy<IServerRegistrationService> serverRegistrationService

    The server registration service.

    Lazy<IEntityService> entityService

    The entity service.

    Lazy<IRelationService> relationService

    The relation service.

    Lazy<IMemberTypeService> memberTypeService

    The member type service.

    Lazy<IMemberGroupService> memberGroupService

    The member group service.

    Lazy<INotificationService> notificationService

    The notification service.

    Lazy<IExternalLoginWithKeyService> externalLoginService

    The external login service.

    Lazy<IRedirectUrlService> redirectUrlService

    The redirect URL service.

    Lazy<IConsentService> consentService

    The consent service.

    Lazy<IKeyValueService> keyValueService

    The key-value service.

    Lazy<IContentTypeBaseServiceProvider> contentTypeBaseServiceProvider

    The content type base service provider.

    Lazy<IWebhookService> webhookService

    The webhook service.

    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

    The content service.

    IMediaService mediaService

    The media service.

    IContentTypeService contentTypeService

    The content type service.

    IMediaTypeService mediaTypeService

    The media type service.

    IDataTypeService dataTypeService

    The data type service.

    IFileService fileService

    The file service.

    ILocalizationService localizationService

    The localization service.

    IPackagingService packagingService

    The packaging service.

    IEntityService entityService

    The entity service.

    IRelationService relationService

    The relation service.

    IMemberGroupService memberGroupService

    The member group service.

    IMemberTypeService memberTypeService

    The member type service.

    IMemberService memberService

    The member service.

    IUserService userService

    The user service.

    ITagService tagService

    The tag service.

    INotificationService notificationService

    The notification service.

    ILocalizedTextService localizedTextService

    The localized text service.

    IAuditService auditService

    The audit service.

    IDomainService domainService

    The domain service.

    IPublicAccessService publicAccessService

    The public access service.

    IExternalLoginWithKeyService externalLoginService

    The external login service.

    IServerRegistrationService serverRegistrationService

    The server registration service.

    IRedirectUrlService redirectUrlService

    The redirect URL service.

    IConsentService consentService

    The consent service.

    IKeyValueService keyValueService

    The key-value service.

    IContentTypeBaseServiceProvider contentTypeBaseServiceProvider

    The content type base service provider.

    IWebhookService webhookService

    The webhook service.

    Returns
    Type Description
    ServiceContext

    A new ServiceContext instance with the specified services.

    Remarks

    Using a true constructor for this confuses DI containers.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX