CSPSolutions.Diagnostics
1.0.0
dotnet add package CSPSolutions.Diagnostics --version 1.0.0
NuGet\Install-Package CSPSolutions.Diagnostics -Version 1.0.0
<PackageReference Include="CSPSolutions.Diagnostics" Version="1.0.0" />
paket add CSPSolutions.Diagnostics --version 1.0.0
#r "nuget: CSPSolutions.Diagnostics, 1.0.0"
// Install CSPSolutions.Diagnostics as a Cake Addin
#addin nuget:?package=CSPSolutions.Diagnostics&version=1.0.0
// Install CSPSolutions.Diagnostics as a Cake Tool
#tool nuget:?package=CSPSolutions.Diagnostics&version=1.0.0
.NET NuGet Package - README
This package provides functionality for diagnostics and hardware information retrieval in .NET applications. The following methods are available:
Get IP
The GetIP
method returns the IP address of the current machine. This can be useful for identifying the machine within a network.
string ipAddress = Diagnostics.GetIP();
Get Hardware Info
The GetHardwareInfo
method returns a HardwareInfo
object containing information about the current machine's hardware. This includes the CPU, RAM, and disk usage.
HardwareInfo hardwareInfo = Diagnostics.GetHardwareInfo();
The HardwareInfo
object has the following properties:
CpuUsage
: The current CPU usage as a percentage.TotalMemory
: The total amount of RAM installed on the machine.AvailableMemory
: The amount of available RAM on the machine.UsedMemory
: The amount of used RAM on the machine.DiskUsage
: The current disk usage as a percentage.
Installation
To install this package, run the following command in the Package Manager Console:
Install-Package Diagnostics
Usage
To use this package in your .NET application, add the following using statement:
using Diagnostics;
Then, call the desired method:
string ipAddress = Diagnostics.GetIP();
HardwareInfo hardwareInfo = Diagnostics.GetHardwareInfo();
License
This package is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub if you have any suggestions or improvements.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- System.Management (>= 7.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 162 | 7/11/2023 |