WallpapersControllerGetNamedWallpaperAsync - метод

Get image source string for wallpaper contents by its name.

Definition

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

Параметры

name  String

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

As it is query parameter of 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 async task.

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

TaskIActionResult
String containing image source for the wallpaper.

Исключения

ArgumentExceptionWallpaper isn't found.

См. также