Table of Contents

Class OptionContext

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class OptionContext
Inheritance
OptionContext
Inherited Members

Constructors

OptionContext(OptionContextOwnedHandle)

public OptionContext(OptionContextOwnedHandle handle)

Parameters

handle OptionContextOwnedHandle

Properties

Handle

public OptionContextOwnedHandle Handle { get; }

Property Value

OptionContextOwnedHandle

Methods

AddGroup(OptionGroup)

[Version("2.6")]
public void AddGroup(OptionGroup group)

Parameters

group OptionGroup

Equals(OptionContext?)

public bool Equals(OptionContext? other)

Parameters

other OptionContext

Returns

bool

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Free()

[Version("2.6")]
public void Free()

GetDescription()

[Version("2.12")]
public string GetDescription()

Returns

string

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetHelp(bool, OptionGroup?)

[Version("2.14")]
public string GetHelp(bool mainHelp, OptionGroup? group)

Parameters

mainHelp bool
group OptionGroup

Returns

string

GetHelpEnabled()

[Version("2.6")]
public bool GetHelpEnabled()

Returns

bool

GetIgnoreUnknownOptions()

[Version("2.6")]
public bool GetIgnoreUnknownOptions()

Returns

bool

GetMainGroup()

[Version("2.6")]
public OptionGroup GetMainGroup()

Returns

OptionGroup

GetStrictPosix()

[Version("2.44")]
public bool GetStrictPosix()

Returns

bool

GetSummary()

[Version("2.12")]
public string GetSummary()

Returns

string

New(string?)

[Version("2.6")]
public static OptionContext New(string? parameterString)

Parameters

parameterString string

Returns

OptionContext

SetDescription(string?)

[Version("2.12")]
public void SetDescription(string? description)

Parameters

description string

SetHelpEnabled(bool)

[Version("2.6")]
public void SetHelpEnabled(bool helpEnabled)

Parameters

helpEnabled bool

SetIgnoreUnknownOptions(bool)

[Version("2.6")]
public void SetIgnoreUnknownOptions(bool ignoreUnknown)

Parameters

ignoreUnknown bool

SetMainGroup(OptionGroup)

[Version("2.6")]
public void SetMainGroup(OptionGroup group)

Parameters

group OptionGroup

SetStrictPosix(bool)

[Version("2.44")]
public void SetStrictPosix(bool strictPosix)

Parameters

strictPosix bool

SetSummary(string?)

[Version("2.12")]
public void SetSummary(string? summary)

Parameters

summary string

SetTranslateFunc(TranslateFunc?)

[Version("2.12")]
public void SetTranslateFunc(TranslateFunc? func)

Parameters

func TranslateFunc

SetTranslationDomain(string)

[Version("2.12")]
public void SetTranslationDomain(string domain)

Parameters

domain string