初始化

This commit is contained in:
2025-11-21 08:48:01 +08:00
commit b4d684a84c
202 changed files with 28585 additions and 0 deletions

38
心跳维持/Program.cs Normal file
View File

@@ -0,0 +1,38 @@
using System;
using System.Timers;
using RestSharp;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace
{
internal class Program
{
public static System.Timers.Timer timer;
static void Main(string[] args)
{
timer = new System.Timers.Timer();
timer.Interval = 20000;
timer.Elapsed += Timer_Elapsed;
timer.Start();
Console.ReadLine();
}
private static void Timer_Elapsed(object? sender, ElapsedEventArgs e)
{
try
{
Console.WriteLine("心跳检测");
var options = new RestClientOptions("http://localhost:19088/");
var client = new RestClient(options);
var request = new RestRequest("api/values/HeartBeat");
var response = client.Post(request);
string? str1 = response.Content;
Console.WriteLine(str1);
}
catch (Exception)
{
}
}
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2025-07-25T07:34:31.4879290Z||;True|2025-07-25T15:19:59.2970683+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RestSharp" Version="112.1.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>E:\tian\BLS\BLWLogServer\心跳维持\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
</Project>