NetworkResurrector.Agent.Wrapper 1.2.0
NetworkResurrector.Agent.Wrapper
NetworkResurrector.Agent is a .NET service designed to execute various host machine actions, including Shutdown, Restart, Sleep, Logout, and Lock.
NetworkResurrector.Agent.Wrapper is a NuGet package that simplifies the integration of the agent within a .NET environment. It registers a service, IResurrectorAgentService
, in the application's service collection, providing methods for each supported action. The package communicates with the agent's API, offering a convenient interface for developers to manage host machines through the agent.
Once installed, the only additional step is to call the UseResurrectorAgentServices
method during application startup. After this, IResurrectorAgentService
can be injected into any class within the application.
Features
- Simple integration with NetworkResurrector.Agent.
- Provides easy-to-use methods for host machine actions (Shutdown, Restart, Sleep, Logout, Lock).
- Registers
IResurrectorAgentService
for dependency injection in the application. - Facilitates communication with the agent's API controller.
Package Repository
You can install NetworkResurrector.Agent.Wrapper from my self-hosted NuGet feed: https://lab.code-rove.com/public-nuget-server/
Installation
Visual Studio
NuGet.config File
Add the following to your NuGet.config
file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="lab.nuget" value="https://lab.code-rove.com/public-nuget-server/v3/index.json" />
</packageSources>
</configuration>
Place this file in your Visual Studio solution directory or configure the new NuGet feed in the NuGet Package Manager. After this, you can install NetworkResurrector.Agent.Wrapper using the NuGet Package Manager.
CLI
To install via the .NET CLI, run the following command in your project directory:
dotnet add package NetworkResurrector.Agent.Wrapper --source https://lab.code-rove.com/public-nuget-server/v3/index.json
Usage
Once installed, call the UseResurrectorAgentServices method in your application startup code to register the service:
public void ConfigureServices(IServiceCollection services)
{
services.UseResurrectorAgentServices();
}
After this, the IResurrectorAgentService
will be available for injection into any class:
public class MyService
{
private readonly IResurrectorAgentService _resurrectorAgentService;
public MyService(IResurrectorAgentService resurrectorAgentService)
{
_resurrectorAgentService = resurrectorAgentService;
}
public void ShutdownHost()
{
_resurrectorAgentService.Shutdown();
}
}
No packages depend on NetworkResurrector.Agent.Wrapper.
1.2.0 release [2025-03-29 02:01] ◾ Added support for .NET 8.0 ◾ Added release notes, icon and readme files
1.1.0 release [2023-01-29 1:53] ◾ Code refactoring ◾ .NET6 upgrade
1.0.0 release [2021-12-09 15:42] ◾ Initial release of NetworkResurrector.Agent.Wrapper
.NET 8.0
- NetworkResurrector.Agent.PublishedLanguage (>= 1.2.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Net.Http.Headers (>= 8.0.14)
- Netmash.Extensions.Http (>= 1.1.0)