【优化】不允许两个自定义类型忽略大小写后同名,避免生成代码文件的平台兼容性问题(例如win下文件名大小写不敏感,如果允许,则会生成到同一个文件名,引起编译问题)
【优化】关闭Luban.Client生成结束后打印的Socket错误日志。main
parent
7901b7012b
commit
2335a82c11
|
|
@ -15,6 +15,7 @@ namespace Luban.Common.Utils
|
||||||
layout = NLog.Layouts.Layout.FromString("${longdate}|${message}${onexception:${newline}${exception:format=tostring}${exception:format=StackTrace}}");
|
layout = NLog.Layouts.Layout.FromString("${longdate}|${message}${onexception:${newline}${exception:format=tostring}${exception:format=StackTrace}}");
|
||||||
}
|
}
|
||||||
logConfig.AddTarget("console", new NLog.Targets.ColoredConsoleTarget() { Layout = layout });
|
logConfig.AddTarget("console", new NLog.Targets.ColoredConsoleTarget() { Layout = layout });
|
||||||
|
logConfig.AddRule(minConsoleLogLevel, NLog.LogLevel.Off, new NLog.Targets.NullTarget(), "Bright.Net.Channels.*", true);
|
||||||
logConfig.AddRule(minConsoleLogLevel, NLog.LogLevel.Fatal, "console");
|
logConfig.AddRule(minConsoleLogLevel, NLog.LogLevel.Fatal, "console");
|
||||||
NLog.LogManager.Configuration = logConfig;
|
NLog.LogManager.Configuration = logConfig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ namespace Luban.Job.Common.Defs
|
||||||
|
|
||||||
public Dictionary<string, DefTypeBase> Types { get; } = new Dictionary<string, DefTypeBase>();
|
public Dictionary<string, DefTypeBase> Types { get; } = new Dictionary<string, DefTypeBase>();
|
||||||
|
|
||||||
|
private readonly Dictionary<string, DefTypeBase> _notCaseSenceTypes = new ();
|
||||||
|
|
||||||
public IAgent Agent { get; protected set; }
|
public IAgent Agent { get; protected set; }
|
||||||
|
|
||||||
public string TopModule { get; protected set; }
|
public string TopModule { get; protected set; }
|
||||||
|
|
@ -175,6 +177,11 @@ namespace Luban.Job.Common.Defs
|
||||||
{
|
{
|
||||||
throw new Exception($"type:'{fullName}' duplicate");
|
throw new Exception($"type:'{fullName}' duplicate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_notCaseSenceTypes.TryAdd(fullName.ToLower(), type))
|
||||||
|
{
|
||||||
|
throw new Exception($"type:'{fullName}' 和 type:'{_notCaseSenceTypes[fullName.ToLower()].FullName}' 类名小写重复. 在win平台有问题");
|
||||||
|
}
|
||||||
Types.Add(fullName, type);
|
Types.Add(fullName, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue