CSPSolutions.Diagnostics 1.0.0

dotnet add package CSPSolutions.Diagnostics --version 1.0.0
NuGet\Install-Package CSPSolutions.Diagnostics -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSPSolutions.Diagnostics" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CSPSolutions.Diagnostics --version 1.0.0
#r "nuget: CSPSolutions.Diagnostics, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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