35 lines
805 B
C#
35 lines
805 B
C#
|
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)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
internal string GetPath()
|
||
|
{
|
||
|
return endpoint;
|
||
|
}
|
||
|
}
|
||
|
}
|