3.0 KiB
3.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T16:03:17.835094+00:00 | zai-org/GLM-5-FP8 | 1 | 39aefdb664565404 |
SystemInformation
Purpose
This module provides hardware identification capabilities for licensing purposes by gathering unique system identifiers from the machine. It retrieves hardware-specific information such as machine name, system UUID, motherboard serial number, and processor ID using Windows Management Instrumentation (WMI), and provides an XSD schema for serializing this system information.
Public Interface
MachineInfo (static class)
static string MachineName { get; }- Returns the NetBIOS name of the local computer viaSystem.Environment.MachineName. Returns empty string on exception.
ComputerSystemInfo (static class)
static string SystemID { get; }- Returns the UUID fromWin32_ComputerSystemProductWMI class. Returns empty string on exception.
MainBoardInfo (static class)
static string SerialNumber { get; }- Returns the serial number fromWin32_BaseBoardWMI class. Returns empty string on exception.
ProcessorInfo (static class)
static string ProcessorID { get; }- Returns the ProcessorID fromWin32_processorWMI class. Returns empty string on exception.
SystemInformationXSD (static class)
static string XSD { get; }- Returns an XSD schema string defining the structure for system information XML (elements: MainBoardSerialNumber, ProcessorID, SystemID, MachineName; attributes: Version, SystemInformationGuid).
Invariants
- All property getters return empty string (
"") on any exception, never null. ManagementObjectSearcherinstances (systemSearcher,baseboardSearcher,cpuSearcher) are created once as static fields and reused.- WMI queries use
FirstOrDefault()pattern; if no results are found, an exception will be caught and empty string returned.
Dependencies
- Depends on:
System.Management(for WMI access),System.Environment - Depended on by: Unclear from source alone - likely licensing/validation components that need hardware fingerprints.
Gotchas
- Platform limitation: WMI queries (
System.Management) are Windows-only; this module will not work on non-Windows platforms. - Static searcher lifecycle: The
ManagementObjectSearcherinstances are held as static fields and never disposed, which could cause resource issues in long-running applications. - Silent failures: All exceptions are swallowed and return empty string, making it difficult to diagnose WMI permission issues or service unavailability.
- First-result only: When multiple processors or baseboards exist, only the first is considered.