mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-04-05 17:37:51 +08:00
22 lines
605 B
C#
22 lines
605 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace CPF.Mac.CoreFoundation
|
|
{
|
|
internal static class CFMutableDictionary
|
|
{
|
|
[DllImport("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation")]
|
|
private static extern void CFDictionarySetValue(IntPtr theDict, IntPtr key, IntPtr value);
|
|
|
|
public static void SetValue(IntPtr theDict, IntPtr key, IntPtr value)
|
|
{
|
|
CFDictionarySetValue(theDict, key, value);
|
|
}
|
|
|
|
public static void SetValue(IntPtr theDict, IntPtr key, bool value)
|
|
{
|
|
SetValue(theDict, key, value ? CFBoolean.True.Handle : CFBoolean.False.Handle);
|
|
}
|
|
}
|
|
}
|