main
吴顺明 10 months ago
parent 7bfedd79bb
commit adba9165b8

@ -22,7 +22,10 @@ namespace UMC.ITME
switch (model)
{
case "Reload":
WebServlet.DomainUnion = (UMC.Data.WebResource.Instance().Provider["union"] ?? ".")[0];
WebServlet.MainDomain = UMC.Data.WebResource.Instance().Provider["domain"] ?? "localhost";
var msg = HttpMimeServier.Load(UMC.Data.Reflection.Configuration("host"));
NetSubscribe.Publish("Servier", "Reload");
if (msg.Length > 0)
{
this.Prompt("提示", msg);

@ -258,7 +258,7 @@ namespace UMC.ITME
}
public class HttpMimeServier : IDoWorker
public class HttpMimeServier : IDoWorker, IStringSubscribe
{
static String _Server = Dns.GetHostName();
public static String Server => _Server;
@ -826,6 +826,7 @@ namespace UMC.ITME
HotCache.LoadFile();
NetSubscribe.Subscribe("Servier", this);
UMC.Web.WebResource.Instance(new UMC.ITME.WebResource(), UMC.Web.WebResource.Instance().Provider);
var hosts = Reflection.Configuration("host");//?? new ProviderConfiguration();
@ -1557,6 +1558,14 @@ namespace UMC.ITME
Register(3600, this);
}
public void Subscribe(string message)
{
WebServlet.DomainUnion = (UMC.Data.WebResource.Instance().Provider["union"] ?? ".")[0];
WebServlet.MainDomain = UMC.Data.WebResource.Instance().Provider["domain"] ?? "localhost";
Load(UMC.Data.Reflection.Configuration("host"));
// throw new NotImplementedException();
}
internal static ConcurrentDictionary<int, HttpMime> httpMimes = new ConcurrentDictionary<int, HttpMime>();

@ -30,11 +30,11 @@ namespace UMC.ITME
return _Instance;
}
static DataFactory _Instance;// = new DataFactory();
public static void Instance(DataFactory dataFactory)
{
_Instance = dataFactory;
NetSubscribe.Subscribe("SiteConfig", _Instance);
}
// public static void Instance(DataFactory dataFactory)
// {
// _Instance = dataFactory;
// NetSubscribe.Subscribe("SiteConfig", _Instance);
// }
public virtual Site[] Site()

@ -3671,7 +3671,7 @@ namespace UMC.ITME
if (this.StaticModel >= 0)
{
var pmd5Key = $"{this.Site.Site.Version}{_RootKey}{WebServlet.MainDomain}";
var pmd5Key = $"{this.Site.Site.Version}{_RootKey}{WebServlet.MainDomain}{WebServlet.DomainUnion}";
switch (this.StaticModel)
{
case 0:

@ -107,9 +107,14 @@ namespace UMC.ITME
break;
}
}
await this.client.SendAsync(buffers.AsMemory(0, index));
}else{
try
{
await this.client.SendAsync(buffers.AsMemory(0, index));
}
catch (Exception ex)
{
Utility.Error("Syslog", ex.ToString());
}
}
}
System.Buffers.ArrayPool<Byte>.Shared.Return(buffers);

@ -38,9 +38,6 @@ namespace UMC.ITME.Activities
ui.NewSection().AddCell("日志服务", new UIClick(request, "Log"));
var http = hosts.Providers.Where(r => r.Type == "http");
var httpUI = ui.NewSection();
@ -207,7 +204,7 @@ namespace UMC.ITME.Activities
fm.AddText("主域名", "domain", provider["domain"]);
var union = provider["union"] ?? ".";
var scheme = provider["scheme"] ?? "http";
fm.AddRadio("连接符", "union").Put(".", ".", union == ".").Put("-", "-", union == "-");
// fm.AddRadio("连接符", "union").Put(".", ".", union == ".").Put("-", "-", union == "-");
fm.AddRadio("主协议", "scheme").Put("http", "http", scheme == "http").Put("https", "https", scheme == "https");
fm.Submit("确认", $"{request.Model}.{request.Command}");
return fm;
@ -215,7 +212,7 @@ namespace UMC.ITME.Activities
provider.Attributes["scheme"] = Domains["scheme"];
provider.Attributes["domain"] = Domains["domain"];
provider.Attributes["union"] = Domains["union"];
// provider.Attributes["union"] = Domains["union"];
var pc = UMC.Data.Reflection.Configuration("assembly") ?? new ProviderConfiguration();

Loading…
Cancel
Save