Class ClipboardBase
Shared abstract class to enforce rules from the implementation of the
IClipboard interface.
Inheritance
System.Object
ClipboardBase
Assembly: Terminal.Gui.dll
Syntax
public abstract class ClipboardBase : Object, IClipboard
Constructors
ClipboardBase()
Declaration
protected ClipboardBase()
Properties
IsSupported
Returns true if the environmental dependencies are in place to interact with the OS clipboard
Declaration
public abstract bool IsSupported { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
GetClipboardData()
Get the operation system clipboard.
Declaration
public string GetClipboardData()
Returns
Type |
Description |
System.String |
|
Exceptions
Type |
Condition |
System.NotSupportedException |
Thrown if it was not possible to read the clipboard contents |
GetClipboardDataImpl()
Get the operation system clipboard.
Declaration
protected abstract string GetClipboardDataImpl()
Returns
Type |
Description |
System.String |
|
SetClipboardData(String)
Sets the operation system clipboard.
Declaration
public void SetClipboardData(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Exceptions
Type |
Condition |
System.NotSupportedException |
Thrown if it was not possible to set the clipboard contents |
SetClipboardDataImpl(String)
Sets the operation system clipboard.
Declaration
protected abstract void SetClipboardDataImpl(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
TryGetClipboardData(out String)
Gets the operation system clipboard if possible.
Declaration
public bool TryGetClipboardData(out string result)
Parameters
Type |
Name |
Description |
System.String |
result |
Clipboard contents read |
Returns
Type |
Description |
System.Boolean |
true if it was possible to read the OS clipboard. |
TrySetClipboardData(String)
Sets the operation system clipboard if possible.
Declaration
public bool TrySetClipboardData(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
Type |
Description |
System.Boolean |
True if the clipboard content was set successfully |
Implements