# NetworkResurrector.Server.PublishedLanguage

[NetworkResurrector.Server](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector/src/branch/master/backend/src/server) is a .NET service designed to perform network-related actions such as **WakeOnLAN**, **Ping**, and **Shutdown** for machines within the same network or in networks where it has access.

**NetworkResurrector.Server.PublishedLanguage** is a NuGet package that encapsulates the published language of **NetworkResurrector.Server**. It streamlines communication with the server in a .NET environment by offering essential **DTOs (Data Transfer Objects)** and constants. This package provides developers with the necessary tools to integrate the server's functionality into their applications, using clear and consistent data structures for seamless integration.

## Key Features

- Supports network management actions like **WakeOnLAN**, **Ping**, and **Shutdown** for local and remote machines.
- Provides DTOs and constants for efficient communication with the server's API.
- Simplifies integration into .NET applications with predefined data structures.

By leveraging **NetworkResurrector.Server.PublishedLanguage**, developers can easily incorporate network-related functionalities into their applications, improving system management and control over the networked devices.

## Package Repository

You can install **NetworkResurrector.Server.PublishedLanguage** from my self-hosted NuGet feed: [https://lab.code-rove.com/public-nuget-server/](https://lab.code-rove.com/public-nuget-server/)

## Installation

### Visual Studio

#### NuGet.config File

To integrate the package, configure your Visual Studio solution with the following `NuGet.config` file:
```xml=!
<?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>
```

Add this NuGet.config file to your solution directory, or alternatively, configure the new NuGet feed in the NuGet Package Manager within Visual Studio. After doing this, you can install NetworkResurrector.Agent.PublishedLanguage using the NuGet Package Manager.


### CLI

```bash=!
dotnet add package NetworkResurrector.Server.PublishedLanguage --source https://lab.code-rove.com/public-nuget-server/v3/index.json
```

Run the above command in a console open in a .NET project directory.

## Usage
Once installed, you can use the DTOs and constants provided by the package to communicate with the servers’s API effectively. Here's an example of how to use a DTO in your application:

```csharp
using NetworkResurrector.Server.PublishedLanguage;

// Example usage of a DTO from the package
var wakeMachine = new WakeMachine { MacAddress = "xx:xx:xx" };

// Your logic here to send the DTO to the server
```