begin
parent
b7e1f2237a
commit
828b57f504
|
@ -1,4 +1,4 @@
|
||||||
namespace NetworkResurrector.Abstractions
|
namespace NetworkResurrector.Server.Abstractions
|
||||||
{
|
{
|
||||||
public interface INotifier
|
public interface INotifier
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace NetworkResurrector.Abstractions
|
namespace NetworkResurrector.Server.Abstractions
|
||||||
{
|
{
|
||||||
public interface IWakeOnLanService
|
public interface IWakeOnLanService
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using NetworkResurrector.Application.Commands;
|
using NetworkResurrector.Application.Commands;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace NetworkResurrector.Api.Controllers
|
namespace NetworkResurrector.Server.Controllers
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -4,7 +4,7 @@ using NetworkResurrector.WakeOnLan.Inhouse;
|
||||||
using NetworkResurrector.WakeOnLan.Nikeee;
|
using NetworkResurrector.WakeOnLan.Nikeee;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace NetworkResurrector.Api.Extensions
|
namespace NetworkResurrector.Server.Extensions
|
||||||
{
|
{
|
||||||
public static class WakeOnLanExtensions
|
public static class WakeOnLanExtensions
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NetworkResurrector.Application\NetworkResurrector.Application.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.Application\NetworkResurrector.Server.Application.csproj" />
|
||||||
<ProjectReference Include="..\NetworkResurrector.WakeOnLan.Inhouse\NetworkResurrector.WakeOnLan.Inhouse.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.WakeOnLan.Inhouse\NetworkResurrector.WakeOnLan.Inhouse.csproj" />
|
||||||
<ProjectReference Include="..\NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
|
@ -10,7 +10,7 @@ using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace NetworkResurrector.Api
|
namespace NetworkResurrector.Server
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"NetworkResurrector.Api": {
|
"NetworkResurrector.Server": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"applicationUrl": "http://localhost:5000",
|
"applicationUrl": "http://localhost:5000",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
|
|
|
@ -8,12 +8,12 @@ using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using NDB.Extensions.Swagger;
|
using NDB.Extensions.Swagger;
|
||||||
using NDB.Security.Authentication.Identity;
|
using NDB.Security.Authentication.Identity;
|
||||||
using NetworkResurrector.Api.Extensions;
|
using NetworkResurrector.Server.Extensions;
|
||||||
using NetworkResurrector.Application;
|
using NetworkResurrector.Application;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace NetworkResurrector.Api
|
namespace NetworkResurrector.Server
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using NetworkResurrector.Abstractions;
|
using NetworkResurrector.Server.Abstractions;
|
||||||
using NetworkResurrector.Application.Commands;
|
using NetworkResurrector.Application.Commands;
|
||||||
using NetworkResurrector.Application.Events;
|
using NetworkResurrector.Application.Events;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Abstractions.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Server.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\NetworkResurrector.Domain\NetworkResurrector.Domain.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.Domain\NetworkResurrector.Server.Domain.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -1,5 +1,5 @@
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using NetworkResurrector.Abstractions;
|
using NetworkResurrector.Server.Abstractions;
|
||||||
|
|
||||||
namespace NetworkResurrector.WakeOnLan.Inhouse
|
namespace NetworkResurrector.WakeOnLan.Inhouse
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Abstractions.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Server.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using NetworkResurrector.Abstractions;
|
using NetworkResurrector.Server.Abstractions;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using NetworkResurrector.Abstractions;
|
using NetworkResurrector.Server.Abstractions;
|
||||||
|
|
||||||
namespace NetworkResurrector.WakeOnLan.Nikeee
|
namespace NetworkResurrector.WakeOnLan.Nikeee
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Abstractions.csproj" />
|
<ProjectReference Include="..\NetworkResurrector.Abstractions\NetworkResurrector.Server.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using NetworkResurrector.Abstractions;
|
using NetworkResurrector.Server.Abstractions;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.30002.166
|
VisualStudioVersion = 16.0.30002.166
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api", "NetworkResurrector.Api\NetworkResurrector.Api.csproj", "{F6600491-5D79-4548-8745-59D9D337D3DB}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server", "NetworkResurrector.Api\NetworkResurrector.Server.csproj", "{F6600491-5D79-4548-8745-59D9D337D3DB}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FDDE879C-E0A3-4BF1-945F-7FEA324C8EBA}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FDDE879C-E0A3-4BF1-945F-7FEA324C8EBA}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
@ -17,11 +17,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||||
ReleaseNotes.xml = ReleaseNotes.xml
|
ReleaseNotes.xml = ReleaseNotes.xml
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Application", "NetworkResurrector.Application\NetworkResurrector.Application.csproj", "{15D65D65-CC96-45DE-8590-AF9132889D98}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Application", "NetworkResurrector.Application\NetworkResurrector.Server.Application.csproj", "{15D65D65-CC96-45DE-8590-AF9132889D98}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Domain", "NetworkResurrector.Domain\NetworkResurrector.Domain.csproj", "{EC78E88E-22DC-4FFD-881E-DEECF0D2494E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Domain", "NetworkResurrector.Domain\NetworkResurrector.Server.Domain.csproj", "{EC78E88E-22DC-4FFD-881E-DEECF0D2494E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Abstractions", "NetworkResurrector.Abstractions\NetworkResurrector.Abstractions.csproj", "{B7408385-ED73-4ED3-9654-9AFF8CDFDA8D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Abstractions", "NetworkResurrector.Abstractions\NetworkResurrector.Server.Abstractions.csproj", "{B7408385-ED73-4ED3-9654-9AFF8CDFDA8D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Nikeee", "NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj", "{59049C2B-CEFB-456D-B3D5-D2CF5325AEEB}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Nikeee", "NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj", "{59049C2B-CEFB-456D-B3D5-D2CF5325AEEB}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -29,7 +29,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLa
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B0C5F0C1-0BF8-4651-AAFC-BE01F516D7B8}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B0C5F0C1-0BF8-4651-AAFC-BE01F516D7B8}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{6889D39C-D8DA-4B99-AFC1-F0B6355E73C0}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "server", "server", "{6889D39C-D8DA-4B99-AFC1-F0B6355E73C0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "agent", "agent", "{43C78941-52E6-4AB8-9170-CC7C006E4784}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "agent", "agent", "{43C78941-52E6-4AB8-9170-CC7C006E4784}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
|
@ -3,7 +3,7 @@ Publish:
|
||||||
dotnet publish --configuration Release --runtime win7-x64
|
dotnet publish --configuration Release --runtime win7-x64
|
||||||
|
|
||||||
Create windows service:
|
Create windows service:
|
||||||
sc create NetworkResurrector.Api binPath= "<path_to_the_service_executable>"
|
sc create NetworkResurrector.Server binPath= "<path_to_the_service_executable>"
|
||||||
#######################################################################################################################################################
|
#######################################################################################################################################################
|
||||||
Resources: https://github.com/nikeee/wake-on-lan
|
Resources: https://github.com/nikeee/wake-on-lan
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue