WallpapersControllerGetNamedWallpaperAsync - метод

Get an image source in base64-string format for wallpaper contents by its name.

Definition

Пространство имён: Tessa.Web.Client.Controllers
Сборка: Tessa.Web.Client (в Tessa.Web.Client.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
[HttpGetAttribute("{name}")]
[SessionMethodAttribute(UserAccessLevel.Regular, false, new string[] { ... })]
[ProducesAttribute("text/plain", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
[ProducesResponseTypeAttribute(204)]
[ProducesResponseTypeAttribute(304)]
public Task<ActionResult<string>> GetNamedWallpaperAsync(
	[FromRouteAttribute] string? name,
	[FromQueryAttribute] GetWallpaperMode mode = GetWallpaperMode.None,
	CancellationToken cancellationToken = default
)

Параметры

name  String

Name of the wallpaper file. If it's the same as UserWallpaperName setting in server configuration, then get custom wallpaper uploaded by current user.

As it is a query parameter of a string type, URI encoding is required to pass it.

mode  GetWallpaperMode  (Optional)
Special event when wallpaper is being changed.
cancellationToken  CancellationToken  (Optional)
Token to cancel the async task.

Возвращаемое значение

TaskActionResultString
Base64-string format containing an image source for the wallpaper.

Исключения

ArgumentExceptionWallpaper isn't found.

См. также