Class KeyFile
- Namespace
- GLib
- Assembly
- GLib-2.0.dll
public sealed class KeyFile : BoxedRecord, IEquatable<KeyFile>
- Inheritance
-
KeyFile
- Implements
- Inherited Members
Constructors
KeyFile(KeyFileOwnedHandle)
public KeyFile(KeyFileOwnedHandle handle)
Parameters
handle
KeyFileOwnedHandle
Properties
Handle
public KeyFileOwnedHandle Handle { get; }
Property Value
Methods
Equals(KeyFile?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(KeyFile? other)
Parameters
other
KeyFileAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
ErrorQuark()
public static Quark ErrorQuark()
Returns
Free()
[Version("2.6")]
public void Free()
GetBoolean(string, string)
[Version("2.6")]
public bool GetBoolean(string groupName, string key)
Parameters
Returns
GetComment(string?, string?)
[Version("2.6")]
public string GetComment(string? groupName, string? key)
Parameters
Returns
GetDouble(string, string)
[Version("2.12")]
public double GetDouble(string groupName, string key)
Parameters
Returns
GetGType()
public static Type GetGType()
Returns
GetGroups(out nuint)
[Version("2.6")]
public string[] GetGroups(out nuint length)
Parameters
length
nuint
Returns
- string[]
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetInt64(string, string)
[Version("2.26")]
public long GetInt64(string groupName, string key)
Parameters
Returns
GetInteger(string, string)
[Version("2.6")]
public int GetInteger(string groupName, string key)
Parameters
Returns
GetKeys(string, out nuint)
[Version("2.6")]
public string[] GetKeys(string groupName, out nuint length)
Parameters
Returns
- string[]
GetLocaleForKey(string, string, string?)
[Version("2.56")]
public string? GetLocaleForKey(string groupName, string key, string? locale)
Parameters
Returns
GetLocaleString(string, string, string?)
[Version("2.6")]
public string GetLocaleString(string groupName, string key, string? locale)
Parameters
Returns
GetLocaleStringList(string, string, string?, out nuint)
[Version("2.6")]
public string[] GetLocaleStringList(string groupName, string key, string? locale, out nuint length)
Parameters
Returns
- string[]
GetStartGroup()
[Version("2.6")]
public string? GetStartGroup()
Returns
GetString(string, string)
[Version("2.6")]
public string GetString(string groupName, string key)
Parameters
Returns
GetStringList(string, string, out nuint)
[Version("2.6")]
public string[] GetStringList(string groupName, string key, out nuint length)
Parameters
Returns
- string[]
GetUint64(string, string)
[Version("2.26")]
public ulong GetUint64(string groupName, string key)
Parameters
Returns
GetValue(string, string)
[Version("2.6")]
public string GetValue(string groupName, string key)
Parameters
Returns
HasGroup(string)
[Version("2.6")]
public bool HasGroup(string groupName)
Parameters
groupName
string
Returns
HasKey(string, string)
[Version("2.6")]
public bool HasKey(string groupName, string key)
Parameters
Returns
LoadFromBytes(Bytes, KeyFileFlags)
[Version("2.50")]
public bool LoadFromBytes(Bytes bytes, KeyFileFlags flags)
Parameters
bytes
Bytesflags
KeyFileFlags
Returns
LoadFromData(string, nuint, KeyFileFlags)
[Version("2.6")]
public bool LoadFromData(string data, nuint length, KeyFileFlags flags)
Parameters
data
stringlength
nuintflags
KeyFileFlags
Returns
LoadFromDataDirs(string, out string, KeyFileFlags)
[Version("2.6")]
public bool LoadFromDataDirs(string file, out string fullPath, KeyFileFlags flags)
Parameters
file
stringfullPath
stringflags
KeyFileFlags
Returns
LoadFromDirs(string, string[], out string, KeyFileFlags)
[Version("2.14")]
public bool LoadFromDirs(string file, string[] searchDirs, out string fullPath, KeyFileFlags flags)
Parameters
file
stringsearchDirs
string[]fullPath
stringflags
KeyFileFlags
Returns
LoadFromFile(string, KeyFileFlags)
[Version("2.6")]
public bool LoadFromFile(string file, KeyFileFlags flags)
Parameters
file
stringflags
KeyFileFlags
Returns
New()
[Version("2.6")]
public static KeyFile New()
Returns
Ref()
[Version("2.32")]
public KeyFile Ref()
Returns
RemoveComment(string?, string?)
[Version("2.6")]
public bool RemoveComment(string? groupName, string? key)
Parameters
Returns
RemoveGroup(string)
[Version("2.6")]
public bool RemoveGroup(string groupName)
Parameters
groupName
string
Returns
RemoveKey(string, string)
[Version("2.6")]
public bool RemoveKey(string groupName, string key)
Parameters
Returns
SaveToFile(string)
[Version("2.40")]
public bool SaveToFile(string filename)
Parameters
filename
string
Returns
SetBoolean(string, string, bool)
[Version("2.6")]
public void SetBoolean(string groupName, string key, bool value)
Parameters
SetBooleanList(string, string, Span<bool>)
[Version("2.6")]
public void SetBooleanList(string groupName, string key, Span<bool> list)
Parameters
SetComment(string?, string?, string)
[Version("2.6")]
public bool SetComment(string? groupName, string? key, string comment)
Parameters
Returns
SetDouble(string, string, double)
[Version("2.12")]
public void SetDouble(string groupName, string key, double value)
Parameters
SetDoubleList(string, string, Span<double>)
[Version("2.12")]
public void SetDoubleList(string groupName, string key, Span<double> list)
Parameters
SetInt64(string, string, long)
[Version("2.26")]
public void SetInt64(string groupName, string key, long value)
Parameters
SetInteger(string, string, int)
[Version("2.6")]
public void SetInteger(string groupName, string key, int value)
Parameters
SetIntegerList(string, string, Span<int>)
[Version("2.6")]
public void SetIntegerList(string groupName, string key, Span<int> list)
Parameters
SetListSeparator(sbyte)
[Version("2.6")]
public void SetListSeparator(sbyte separator)
Parameters
separator
sbyte
SetLocaleString(string, string, string, string)
[Version("2.6")]
public void SetLocaleString(string groupName, string key, string locale, string @string)
Parameters
SetLocaleStringList(string, string, string, string[], nuint)
[Version("2.6")]
public void SetLocaleStringList(string groupName, string key, string locale, string[] list, nuint length)
Parameters
SetString(string, string, string)
[Version("2.6")]
public void SetString(string groupName, string key, string @string)
Parameters
SetStringList(string, string, string[], nuint)
[Version("2.6")]
public void SetStringList(string groupName, string key, string[] list, nuint length)
Parameters
SetUint64(string, string, ulong)
[Version("2.26")]
public void SetUint64(string groupName, string key, ulong value)
Parameters
SetValue(string, string, string)
[Version("2.6")]
public void SetValue(string groupName, string key, string value)
Parameters
ToData(out nuint)
[Version("2.6")]
public string ToData(out nuint length)
Parameters
length
nuint
Returns
Unref()
[Version("2.32")]
public void Unref()