Coree.NETWindows
  • API
Show / Hide Table of Contents
  • Coree.NETWindows
    • KeyModifier
    • Keys
  • Coree.NETWindows.Classes
    • GlobalHotkey
  • Coree.NETWindows.NativeMethods
    • ConsoleManagement
    • ConsoleManagement.ConsoleColors
  • Coree.NETWindows.Services.PInvoke
    • IPInvokeService
    • PInvokeService
  • Coree.NETWindows.Utilities
    • MainContext

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 Source

DisableCloseButton()

Disables the close button of the current window using platform-specific methods.

Declaration
void DisableCloseButton()
| Edit this page View Source

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
CancellationToken cancellationToken

The cancellation token to cancel the operation.

Returns
Type Description
Task

A task representing the asynchronous operation.

| Edit this page View Source

DisableQuickEditMode()

Disables the quick edit mode of the console.

Declaration
void DisableQuickEditMode()
| Edit this page View Source

DisableQuickEditModeAsync(CancellationToken)

Disables the quick edit mode of the console.

Declaration
Task DisableQuickEditModeAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token to cancel the operation.

Returns
Type Description
Task

A task representing the asynchronous operation.

| Edit this page View Source

FreeConsole()

Releases the current console window associated with the calling process synchronously.

Declaration
void FreeConsole()
| Edit this page View Source

FreeConsoleAsync(CancellationToken)

Asynchronously releases the current console window associated with the calling process.

Declaration
Task FreeConsoleAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token to cancel the operation.

Returns
Type Description
Task

A task representing the asynchronous operation.

| Edit this page View Source

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").

| Edit this page View Source

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").

CancellationToken cancellationToken

The cancellation token to cancel the operation (default is None).

Returns
Type Description
Task

A task representing the asynchronous operation.

| Edit this page View Source

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.

| Edit this page View Source

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.

CancellationToken cancellationToken

The cancellation token to cancel the operation.

Returns
Type Description
Task

A task representing the asynchronous operation.

  • Edit this page
  • View Source
In this article
Back to top