2021-03-18 18:51:13 +00:00
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
namespace CLre_server.WebStatus
|
|
|
|
{
|
|
|
|
public class Attributes
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
[System.AttributeUsage(System.AttributeTargets.Method)]
|
|
|
|
public class WebEndpointAttribute : System.Attribute
|
|
|
|
{
|
|
|
|
private readonly string endpoint;
|
|
|
|
|
|
|
|
public WebEndpointAttribute(string path)
|
|
|
|
{
|
|
|
|
endpoint = path;
|
|
|
|
Assembly asm = Assembly.GetCallingAssembly();
|
|
|
|
if (!WebServer._assembliesToCheck.Contains(asm))
|
|
|
|
{
|
|
|
|
WebServer._assembliesToCheck.Add(asm);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (WebServer.MainInstance != null && WebServer.MainInstance.IsRunning)
|
|
|
|
{
|
2021-08-14 02:26:48 +01:00
|
|
|
// Web server is already running
|
|
|
|
// TODO
|
2021-03-18 18:51:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
internal string GetPath()
|
|
|
|
{
|
|
|
|
return endpoint;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|