View Source
Class PreviewService
Assembly: Umbraco.Core.dll
Syntax
public class PreviewService : IPreviewService
Constructors
View Source
PreviewService(ICookieManager, IPreviewTokenGenerator, IServiceScopeFactory, IRequestCache)
Declaration
public PreviewService(ICookieManager cookieManager, IPreviewTokenGenerator previewTokenGenerator, IServiceScopeFactory serviceScopeFactory, IRequestCache requestCache)
Parameters
Methods
View Source
EndPreviewAsync()
Exits preview mode for a given user that calls this
Declaration
public Task EndPreviewAsync()
Returns
View Source
IsInPreview()
Declaration
public bool IsInPreview()
Returns
View Source
TryEnterPreviewAsync(IUser)
Enters preview mode for a given user that calls this
Declaration
public Task<bool> TryEnterPreviewAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
Returns
| Type |
Description |
| Task<bool> |
|
View Source
TryGetPreviewClaimsIdentityAsync()
Declaration
public Task<Attempt<ClaimsIdentity>> TryGetPreviewClaimsIdentityAsync()
Returns
| Type |
Description |
| Task<Attempt<ClaimsIdentity>> |
|