-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDeviceTypeInfo.cs
More file actions
47 lines (43 loc) · 1.49 KB
/
DeviceTypeInfo.cs
File metadata and controls
47 lines (43 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace BytecodeApi.Win32.SystemInfo;
/// <summary>
/// Represents a device type, containing an array of <see cref="DeviceInfo" />, retrieved by <see cref="DeviceManager" />.
/// </summary>
[DebuggerDisplay($"{nameof(DeviceTypeInfo)}: ClassName = {{ClassName}}, Devices: {{Devices.Count}}")]
public sealed class DeviceTypeInfo
{
/// <summary>
/// Gets the class GUID of this device type.
/// </summary>
public string ClassGuid { get; internal set; } = null!;
/// <summary>
/// Gets the class name of this device type.
/// </summary>
public string? ClassName { get; internal set; }
/// <summary>
/// Gets the path to the resource DLL that contains the icon associated with this device type.
/// </summary>
public string? IconPath { get; internal set; }
/// <summary>
/// Gets the icon index (resource name) within the resource DLL located in <see cref="IconPath" />.
/// </summary>
public int? IconIndex { get; internal set; }
/// <summary>
/// Gets all <see cref="DeviceInfo" /> objects of this device type.
/// </summary>
public ReadOnlyCollection<DeviceInfo> Devices { get; internal set; } = null!;
internal DeviceTypeInfo()
{
}
/// <summary>
/// Returns the class name of this <see cref="DeviceTypeInfo" />.
/// </summary>
/// <returns>
/// The name of this <see cref="DeviceTypeInfo" />.
/// </returns>
public override string ToString()
{
return ClassName ?? "";
}
}