Table of Contents

Class ClipboardExtensions

Namespace
Artemis.UI.Shared.Extensions
Assembly
Artemis.UI.Shared.dll

Provides extension methods for Avalonia's Avalonia.Input.Platform.IClipboard type.

public static class ClipboardExtensions
Inheritance
object
ClipboardExtensions

Methods

GetJsonAsync<T>(IClipboard, string)

Retrieves clipboard JSON data representing T and deserializes it into an instance of T.

public static Task<T?> GetJsonAsync<T>(this IClipboard clipboard, string format)

Parameters

clipboard IClipboard

The clipboard to retrieve the data off.

format string

The data format to retrieve data for.

Returns

Task<T>

The resulting value or if the clipboard did not contain data for the provided format; null.

Type Parameters

T

The type of data to retrieve