THRIFT-4831 interface ITProtocolFactory should be class TProtocolFactory again
Client: netstd
Patch: Jens Geyer

This closes #1767
diff --git a/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs b/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs
index 37bca80..7a0243a 100644
--- a/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs
+++ b/lib/netstd/Thrift/Protocol/TBinaryProtocol.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
 // or more contributor license agreements.See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.The ASF licenses this file
@@ -588,7 +588,7 @@
             return Encoding.UTF8.GetString(buf, 0, buf.Length);
         }
 
-        public class Factory : ITProtocolFactory
+        public class Factory : TProtocolFactory
         {
             protected bool StrictRead;
             protected bool StrictWrite;
@@ -604,10 +604,10 @@
                 StrictWrite = strictWrite;
             }
 
-            public TProtocol GetProtocol(TTransport trans)
+            public override TProtocol GetProtocol(TTransport trans)
             {
                 return new TBinaryProtocol(trans, StrictRead, StrictWrite);
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/lib/netstd/Thrift/Protocol/TCompactProtocol.cs b/lib/netstd/Thrift/Protocol/TCompactProtocol.cs
index 9ff640a..e6c5dbd 100644
--- a/lib/netstd/Thrift/Protocol/TCompactProtocol.cs
+++ b/lib/netstd/Thrift/Protocol/TCompactProtocol.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
 // or more contributor license agreements.See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.The ASF licenses this file
@@ -891,9 +891,9 @@
             buf[off + 7] = (byte) ((n >> 56) & 0xff);
         }
 
-        public class Factory : ITProtocolFactory
+        public class Factory : TProtocolFactory
         {
-            public TProtocol GetProtocol(TTransport trans)
+            public override TProtocol GetProtocol(TTransport trans)
             {
                 return new TCompactProtocol(trans);
             }
@@ -919,4 +919,4 @@
             public const byte Struct = 0x0C;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/lib/netstd/Thrift/Protocol/TJSONProtocol.cs b/lib/netstd/Thrift/Protocol/TJSONProtocol.cs
index fab1385..8e40c48 100644
--- a/lib/netstd/Thrift/Protocol/TJSONProtocol.cs
+++ b/lib/netstd/Thrift/Protocol/TJSONProtocol.cs
@@ -785,9 +785,9 @@
         /// <summary>
         ///     Factory for JSON protocol objects
         /// </summary>
-        public class Factory : ITProtocolFactory
+        public class Factory : TProtocolFactory
         {
-            public TProtocol GetProtocol(TTransport trans)
+            public override TProtocol GetProtocol(TTransport trans)
             {
                 return new TJsonProtocol(trans);
             }
diff --git a/lib/netstd/Thrift/Protocol/ITProtocolFactory.cs b/lib/netstd/Thrift/Protocol/TProtocolFactory.cs
similarity index 89%
rename from lib/netstd/Thrift/Protocol/ITProtocolFactory.cs
rename to lib/netstd/Thrift/Protocol/TProtocolFactory.cs
index 3abcbb0..31b0514 100644
--- a/lib/netstd/Thrift/Protocol/ITProtocolFactory.cs
+++ b/lib/netstd/Thrift/Protocol/TProtocolFactory.cs
@@ -20,8 +20,8 @@
 namespace Thrift.Protocol
 {
     // ReSharper disable once InconsistentNaming
-    public interface ITProtocolFactory
+    public abstract class TProtocolFactory
     {
-        TProtocol GetProtocol(TTransport trans);
+        public abstract TProtocol GetProtocol(TTransport trans);
     }
-}
\ No newline at end of file
+}
diff --git a/lib/netstd/Thrift/Server/TServer.cs b/lib/netstd/Thrift/Server/TServer.cs
index b351913..f40f2b7 100644
--- a/lib/netstd/Thrift/Server/TServer.cs
+++ b/lib/netstd/Thrift/Server/TServer.cs
@@ -29,10 +29,10 @@
     public abstract class TServer
     {
         protected readonly ILogger Logger;
-        protected ITProtocolFactory InputProtocolFactory;
+        protected TProtocolFactory InputProtocolFactory;
         protected TTransportFactory InputTransportFactory;
         protected ITProcessorFactory ProcessorFactory;
-        protected ITProtocolFactory OutputProtocolFactory;
+        protected TProtocolFactory OutputProtocolFactory;
         protected TTransportFactory OutputTransportFactory;
 
         protected TServerEventHandler ServerEventHandler;
@@ -40,7 +40,7 @@
 
         protected TServer(ITProcessorFactory processorFactory, TServerTransport serverTransport,
             TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory,
-            ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
+            TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory,
             ILogger logger = null)
         {
             ProcessorFactory = processorFactory ?? throw new ArgumentNullException(nameof(processorFactory));
diff --git a/lib/netstd/Thrift/Server/TSimpleAsyncServer.cs b/lib/netstd/Thrift/Server/TSimpleAsyncServer.cs
index a0a3e4c..813d3f3 100644
--- a/lib/netstd/Thrift/Server/TSimpleAsyncServer.cs
+++ b/lib/netstd/Thrift/Server/TSimpleAsyncServer.cs
@@ -34,7 +34,7 @@
         private volatile Task _serverTask;
 
         public TSimpleAsyncServer(ITAsyncProcessor processor, TServerTransport serverTransport,
-            ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
+            TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory,
             ILoggerFactory loggerFactory, int clientWaitingDelay = 10)
             : this(new TSingletonProcessorFactory(processor), serverTransport,
                 new TTransportFactory(), new TTransportFactory(),
@@ -45,7 +45,7 @@
 
         public TSimpleAsyncServer(ITProcessorFactory itProcessorFactory, TServerTransport serverTransport,
             TTransportFactory inputTransportFactory, TTransportFactory outputTransportFactory,
-            ITProtocolFactory inputProtocolFactory, ITProtocolFactory outputProtocolFactory,
+            TProtocolFactory inputProtocolFactory, TProtocolFactory outputProtocolFactory,
             ILogger logger, int clientWaitingDelay = 10)
             : base(itProcessorFactory, serverTransport, inputTransportFactory, outputTransportFactory,
                 inputProtocolFactory, outputProtocolFactory, logger)
diff --git a/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs b/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs
index e5c5660..1c76b68 100644
--- a/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs
+++ b/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs
@@ -77,7 +77,7 @@
         public TThreadPoolAsyncServer(ITAsyncProcessor processor,
          TServerTransport serverTransport,
          TTransportFactory transportFactory,
-         ITProtocolFactory protocolFactory)
+         TProtocolFactory protocolFactory)
             : this(new TSingletonProcessorFactory(processor), serverTransport,
                transportFactory, transportFactory,
                protocolFactory, protocolFactory,
@@ -88,7 +88,7 @@
         public TThreadPoolAsyncServer(ITProcessorFactory processorFactory,
                      TServerTransport serverTransport,
                      TTransportFactory transportFactory,
-                     ITProtocolFactory protocolFactory)
+                     TProtocolFactory protocolFactory)
             : this(processorFactory, serverTransport,
              transportFactory, transportFactory,
              protocolFactory, protocolFactory,
@@ -100,8 +100,8 @@
                      TServerTransport serverTransport,
                      TTransportFactory inputTransportFactory,
                      TTransportFactory outputTransportFactory,
-                     ITProtocolFactory inputProtocolFactory,
-                     ITProtocolFactory outputProtocolFactory,
+                     TProtocolFactory inputProtocolFactory,
+                     TProtocolFactory outputProtocolFactory,
                      int minThreadPoolThreads, int maxThreadPoolThreads, ILogger logger= null)
             : this(processorFactory, serverTransport, inputTransportFactory, outputTransportFactory,
              inputProtocolFactory, outputProtocolFactory,
@@ -114,8 +114,8 @@
                      TServerTransport serverTransport,
                      TTransportFactory inputTransportFactory,
                      TTransportFactory outputTransportFactory,
-                     ITProtocolFactory inputProtocolFactory,
-                     ITProtocolFactory outputProtocolFactory,
+                     TProtocolFactory inputProtocolFactory,
+                     TProtocolFactory outputProtocolFactory,
                      Configuration threadConfig,
                      ILogger logger = null)
             : base(processorFactory, serverTransport, inputTransportFactory, outputTransportFactory,
diff --git a/lib/netstd/Thrift/Transport/Server/THttpServerTransport.cs b/lib/netstd/Thrift/Transport/Server/THttpServerTransport.cs
index 953db70..b5a500c 100644
--- a/lib/netstd/Thrift/Transport/Server/THttpServerTransport.cs
+++ b/lib/netstd/Thrift/Transport/Server/THttpServerTransport.cs
@@ -35,8 +35,8 @@
         private readonly RequestDelegate _next;
         protected Encoding Encoding = Encoding.UTF8;
 
-        protected ITProtocolFactory InputProtocolFactory;
-        protected ITProtocolFactory OutputProtocolFactory;
+        protected TProtocolFactory InputProtocolFactory;
+        protected TProtocolFactory OutputProtocolFactory;
 
         protected TTransportFactory InputTransportFactory;
         protected TTransportFactory OutputTransportFactory;
@@ -50,7 +50,7 @@
 
         public THttpServerTransport(
             ITAsyncProcessor processor, 
-            ITProtocolFactory protocolFactory, 
+            TProtocolFactory protocolFactory, 
             TTransportFactory transFactory = null, 
             RequestDelegate next = null,
             ILoggerFactory loggerFactory = null)
@@ -60,8 +60,8 @@
 
         public THttpServerTransport(
             ITAsyncProcessor processor, 
-            ITProtocolFactory inputProtocolFactory,
-            ITProtocolFactory outputProtocolFactory,
+            TProtocolFactory inputProtocolFactory,
+            TProtocolFactory outputProtocolFactory,
             TTransportFactory inputTransFactory = null,
             TTransportFactory outputTransFactory = null,
             RequestDelegate next = null, 
@@ -114,4 +114,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/lib/netstd/Thrift/Transport/TTransportFactory.cs b/lib/netstd/Thrift/Transport/TTransportFactory.cs
index 69662f3..16e27ac 100644
--- a/lib/netstd/Thrift/Transport/TTransportFactory.cs
+++ b/lib/netstd/Thrift/Transport/TTransportFactory.cs
@@ -32,4 +32,4 @@
             return trans;
         }
     }
-}
\ No newline at end of file
+}