starting finaly
This commit is contained in:
parent
94d236fa50
commit
2477e4bb88
6 changed files with 159 additions and 54 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.30907.101
|
VisualStudioVersion = 17.1.32228.430
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Secondbot", "Secondbot", "{4388BA41-F3FC-4A0E-AA00-50E9ED45A027}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Secondbot", "Secondbot", "{4388BA41-F3FC-4A0E-AA00-50E9ED45A027}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
@ -27,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreMetaverse.StructuredDa
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreMetaverse.Types", "LibreMetaverse.Types\LibreMetaverse.Types.csproj", "{B37B02AD-0000-0000-0000-000000000000}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreMetaverse.Types", "LibreMetaverse.Types\LibreMetaverse.Types.csproj", "{B37B02AD-0000-0000-0000-000000000000}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecondBotEvents", "SecondBotEvents\SecondBotEvents.csproj", "{571AB1AF-4C74-4C37-AC5B-9B63383AC791}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -148,6 +150,24 @@ Global
|
||||||
{B37B02AD-0000-0000-0000-000000000000}.Release|x64.Build.0 = Release|x64
|
{B37B02AD-0000-0000-0000-000000000000}.Release|x64.Build.0 = Release|x64
|
||||||
{B37B02AD-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|x86
|
{B37B02AD-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|x86
|
||||||
{B37B02AD-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|x86
|
{B37B02AD-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|x86
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|x64.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.DockerBuild|x86.Build.0 = Debug|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
@ -159,6 +179,7 @@ Global
|
||||||
{27C70F3A-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
{27C70F3A-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
||||||
{89D7A3E5-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
{89D7A3E5-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
||||||
{B37B02AD-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
{B37B02AD-0000-0000-0000-000000000000} = {E9B97D05-D5FB-4CA9-99C3-839248621C21}
|
||||||
|
{571AB1AF-4C74-4C37-AC5B-9B63383AC791} = {4388BA41-F3FC-4A0E-AA00-50E9ED45A027}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {EC43F382-FAF2-49CC-8E23-5DDF87592DFA}
|
SolutionGuid = {EC43F382-FAF2-49CC-8E23-5DDF87592DFA}
|
||||||
|
|
|
||||||
47
SecondBotEvents/EventsSecondBot.cs
Normal file
47
SecondBotEvents/EventsSecondBot.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
using SecondBotEvents.Services;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace SecondBotEvents
|
||||||
|
{
|
||||||
|
internal class Startup
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Welcome to Secondbot [Events build] version: " + AssemblyInfo.GetGitHash());
|
||||||
|
EventsSecondBot worker = new EventsSecondBot();
|
||||||
|
|
||||||
|
while(worker.exit() == false)
|
||||||
|
{
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class EventsSecondBot
|
||||||
|
{
|
||||||
|
protected http HttpService = null;
|
||||||
|
public EventsSecondBot()
|
||||||
|
{
|
||||||
|
HttpService = new http(this);
|
||||||
|
}
|
||||||
|
public bool exit()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class AssemblyInfo
|
||||||
|
{
|
||||||
|
/// <summary> Gets the git hash value from the assembly
|
||||||
|
/// or null if it cannot be found. </summary>
|
||||||
|
public static string GetGitHash()
|
||||||
|
{
|
||||||
|
var asm = typeof(AssemblyInfo).Assembly;
|
||||||
|
var attrs = asm.GetCustomAttributes<AssemblyMetadataAttribute>();
|
||||||
|
return attrs.FirstOrDefault(a => a.Key == "GitHash")?.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
SecondBotEvents/SecondBotEvents.csproj
Normal file
9
SecondBotEvents/SecondBotEvents.csproj
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<StartupObject>SecondBotEvents.Startup</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
16
SecondBotEvents/Services/HTTP/http.cs
Normal file
16
SecondBotEvents/Services/HTTP/http.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace SecondBotEvents.Services
|
||||||
|
{
|
||||||
|
internal class http
|
||||||
|
{
|
||||||
|
protected EventsSecondBot master;
|
||||||
|
public http(EventsSecondBot setMaster)
|
||||||
|
{
|
||||||
|
master = setMaster;
|
||||||
|
Console.WriteLine("Starting HTTP service");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
SecondBotEvents/Services/HTTP/http_config.cs
Normal file
12
SecondBotEvents/Services/HTTP/http_config.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace SecondBotEvents.Services.HTTP
|
||||||
|
{
|
||||||
|
public class http_config
|
||||||
|
{
|
||||||
|
public int port = 8080;
|
||||||
|
public bool enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue