mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
34 lines
987 B
C#
34 lines
987 B
C#
|
|
namespace Microsoft.WindowsAPICodePack.Taskbar
|
|
{
|
|
/// <summary>
|
|
/// Provides internal access to the functions provided by the ITaskbarList4 interface,
|
|
/// without being forced to refer to it through another singleton.
|
|
/// </summary>
|
|
internal static class TaskbarList
|
|
{
|
|
private static object _syncLock = new object();
|
|
|
|
private static ITaskbarList4 _taskbarList;
|
|
internal static ITaskbarList4 Instance
|
|
{
|
|
get
|
|
{
|
|
if (_taskbarList == null)
|
|
{
|
|
lock (_syncLock)
|
|
{
|
|
if (_taskbarList == null)
|
|
{
|
|
_taskbarList = (ITaskbarList4)new CTaskbarList();
|
|
_taskbarList.HrInit();
|
|
}
|
|
}
|
|
}
|
|
|
|
return _taskbarList;
|
|
}
|
|
}
|
|
}
|
|
}
|