THRIFT-5504 CA2254 Message template should be compile time constant
Client netstd
Patch: Jens Geyer
diff --git a/lib/netstd/Thrift/Server/TServer.cs b/lib/netstd/Thrift/Server/TServer.cs
index 3fd0bc5..3d4f3fc 100644
--- a/lib/netstd/Thrift/Server/TServer.cs
+++ b/lib/netstd/Thrift/Server/TServer.cs
@@ -35,7 +35,7 @@
protected TProtocolFactory OutputProtocolFactory;
protected TTransportFactory OutputTransportFactory;
- protected TServerEventHandler ServerEventHandler;
+ protected ITServerEventHandler ServerEventHandler;
protected TServerTransport ServerTransport;
protected TServer(ITProcessorFactory processorFactory, TServerTransport serverTransport,
@@ -52,12 +52,12 @@
Logger = logger; // null is absolutely legal
}
- public void SetEventHandler(TServerEventHandler seh)
+ public void SetEventHandler(ITServerEventHandler seh)
{
ServerEventHandler = seh;
}
- public TServerEventHandler GetEventHandler()
+ public ITServerEventHandler GetEventHandler()
{
return ServerEventHandler;
}
@@ -66,7 +66,7 @@
protected void LogError( string msg)
{
if (Logger != null)
- Logger.LogError(msg);
+ Logger.LogError("{Msg}",msg); // NOTE: Log message template, not string interpolation!
}
public abstract void Stop();