Interface IPInvokeService
Represents the interface for invoking platform (P/Invoke) methods.
Namespace: Coree.NETWindows.Services.PInvoke
Assembly: Coree.NETWindows.dll
Syntax
public interface IPInvokeService
Methods
| Edit this page View SourceDisableCloseButton()
Disables the close button of the current window using platform-specific methods.
Declaration
void DisableCloseButton()
DisableCloseButtonAsync(CancellationToken)
Asynchronously disables the close button of the current window using platform-specific methods.
Declaration
Task DisableCloseButtonAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | The cancellation token to cancel the operation. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
DisableQuickEditMode()
Disables the quick edit mode of the console.
Declaration
void DisableQuickEditMode()
DisableQuickEditModeAsync(CancellationToken)
Disables the quick edit mode of the console.
Declaration
Task DisableQuickEditModeAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | The cancellation token to cancel the operation. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
FreeConsole()
Releases the current console window associated with the calling process synchronously.
Declaration
void FreeConsole()
FreeConsoleAsync(CancellationToken)
Asynchronously releases the current console window associated with the calling process.
Declaration
Task FreeConsoleAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | The cancellation token to cancel the operation. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
SetConsoleFont(short, string)
Sets the font of the console window synchronously.
Declaration
void SetConsoleFont(short fontSize = 14, string fontName = "Lucida Console")
Parameters
Type | Name | Description |
---|---|---|
short | fontSize | The size of the font to set (default is 14). |
string | fontName | The name of the font to set (default is "Lucida Console"). |
SetConsoleFontAsync(short, string, CancellationToken)
Sets the font of the console window asynchronously.
Declaration
Task SetConsoleFontAsync(short fontSize = 14, string fontName = "Lucida Console", CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
short | fontSize | The size of the font to set (default is 14). |
string | fontName | The name of the font to set (default is "Lucida Console"). |
Cancellation |
cancellationToken | The cancellation token to cancel the operation (default is None). |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
SetConsoleTitle(string)
Sets the title of the console window.
Declaration
void SetConsoleTitle(string consoleTitle)
Parameters
Type | Name | Description |
---|---|---|
string | consoleTitle | The new title for the console window. |
SetConsoleTitleAsync(string, CancellationToken)
Sets the title of the console window.
Declaration
Task SetConsoleTitleAsync(string consoleTitle, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | consoleTitle | The new title for the console window. |
Cancellation |
cancellationToken | The cancellation token to cancel the operation. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |