Added ServiceMonitor tester
This commit is contained in:
parent
c8c7d0a3a2
commit
2bfd7c0f86
|
@ -5,7 +5,7 @@ using EonaCat.Env.Helpers;
|
|||
Console.WriteLine("Hello, World!");
|
||||
Env.LoadIntoEnvironment();
|
||||
var test = Env.Read(new Settings(traverseDirectories:true));
|
||||
Getter.SwallowExceptions = true;
|
||||
Getter.SwallowExceptions = false;
|
||||
Console.WriteLine(Environment.GetEnvironmentVariable("nummer4"));
|
||||
Console.WriteLine(Getter.GetString("nummer4"));
|
||||
Console.WriteLine("+------+");
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33110.190
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceMonitor", "ServiceMonitor\ServiceMonitor.csproj", "{013B9DD8-707B-40CE-8143-7649C9557128}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{013B9DD8-707B-40CE-8143-7649C9557128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{013B9DD8-707B-40CE-8143-7649C9557128}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{013B9DD8-707B-40CE-8143-7649C9557128}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{013B9DD8-707B-40CE-8143-7649C9557128}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FA1E89EA-0D00-4FBA-8AED-3F46FF0A692D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,20 @@
|
|||
using EonaCat.ServiceMonitor;
|
||||
using System.Runtime.CompilerServices;
|
||||
using static EonaCat.ServiceMonitor.StatusChecker;
|
||||
|
||||
const string ACCESS_TOKEN = $"MY_PRIVATE_ACCESSKEY";
|
||||
const string SLACK_URL = $"https://slack.com/{ACCESS_TOKEN}";
|
||||
|
||||
//CertificateInformation
|
||||
|
||||
var test = await StatusChecker.CheckHostAsync("https://EonaCat.com", 80, MONITOR_PROTOCOL.WEB);
|
||||
|
||||
SlackClient slackClient = new SlackClient(SLACK_URL);
|
||||
|
||||
Payload payload = new Payload();
|
||||
payload.Channel = "EonaCat";
|
||||
payload.Text = "Hello NuGet users";
|
||||
payload.Icon = "pizza";
|
||||
payload.Username = "C# information bot";
|
||||
|
||||
slackClient.PostMessage(payload);
|
|
@ -0,0 +1,16 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="EonaCat.ServiceMonitor">
|
||||
<HintPath>..\..\..\EonaCat.ServiceMonitor\EonaCat.ServiceMonitor\bin\Debug\EonaCat.ServiceMonitor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue