THRIFT-4723 Consolidate C#/netcore into new netstd language target
Client: netstd
Patch: Jens Geyer

This closes #1710
diff --git a/lib/netstd/Thrift/Protocol/Entities/TField.cs b/lib/netstd/Thrift/Protocol/Entities/TField.cs
new file mode 100644
index 0000000..4e29bb5
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TField.cs
@@ -0,0 +1,37 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TField
+    {
+        public TField(string name, TType type, short id)
+        {
+            Name = name;
+            Type = type;
+            ID = id;
+        }
+
+        public string Name { get; set; }
+
+        public TType Type { get; set; }
+
+        // ReSharper disable once InconsistentNaming - do not rename - it used for generation 
+        public short ID { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TList.cs b/lib/netstd/Thrift/Protocol/Entities/TList.cs
new file mode 100644
index 0000000..f599225
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TList.cs
@@ -0,0 +1,33 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TList
+    {
+        public TList(TType elementType, int count)
+        {
+            ElementType = elementType;
+            Count = count;
+        }
+
+        public TType ElementType { get; set; }
+
+        public int Count { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TMap.cs b/lib/netstd/Thrift/Protocol/Entities/TMap.cs
new file mode 100644
index 0000000..1efebe7
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TMap.cs
@@ -0,0 +1,36 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TMap
+    {
+        public TMap(TType keyType, TType valueType, int count)
+        {
+            KeyType = keyType;
+            ValueType = valueType;
+            Count = count;
+        }
+
+        public TType KeyType { get; set; }
+
+        public TType ValueType { get; set; }
+
+        public int Count { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TMessage.cs b/lib/netstd/Thrift/Protocol/Entities/TMessage.cs
new file mode 100644
index 0000000..08d741d
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TMessage.cs
@@ -0,0 +1,37 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TMessage
+    {
+        public TMessage(string name, TMessageType type, int seqid)
+        {
+            Name = name;
+            Type = type;
+            SeqID = seqid;
+        }
+
+        public string Name { get; set; }
+
+        public TMessageType Type { get; set; }
+
+        // ReSharper disable once InconsistentNaming - do not rename - it used for generation 
+        public int SeqID { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TMessageType.cs b/lib/netstd/Thrift/Protocol/Entities/TMessageType.cs
new file mode 100644
index 0000000..24d663e
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TMessageType.cs
@@ -0,0 +1,28 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public enum TMessageType
+    {
+        Call = 1,
+        Reply = 2,
+        Exception = 3,
+        Oneway = 4
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TSet.cs b/lib/netstd/Thrift/Protocol/Entities/TSet.cs
new file mode 100644
index 0000000..692d564
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TSet.cs
@@ -0,0 +1,38 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TSet
+    {
+        public TSet(TType elementType, int count)
+        {
+            ElementType = elementType;
+            Count = count;
+        }
+
+        public TSet(TList list)
+            : this(list.ElementType, list.Count)
+        {
+        }
+
+        public TType ElementType { get; set; }
+
+        public int Count { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TStruct.cs b/lib/netstd/Thrift/Protocol/Entities/TStruct.cs
new file mode 100644
index 0000000..e04167e
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TStruct.cs
@@ -0,0 +1,30 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public struct TStruct
+    {
+        public TStruct(string name)
+        {
+            Name = name;
+        }
+
+        public string Name { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/netstd/Thrift/Protocol/Entities/TType.cs b/lib/netstd/Thrift/Protocol/Entities/TType.cs
new file mode 100644
index 0000000..4e922a7
--- /dev/null
+++ b/lib/netstd/Thrift/Protocol/Entities/TType.cs
@@ -0,0 +1,37 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace Thrift.Protocol.Entities
+{
+    // ReSharper disable once InconsistentNaming
+    public enum TType : byte
+    {
+        Stop = 0,
+        Void = 1,
+        Bool = 2,
+        Byte = 3,
+        Double = 4,
+        I16 = 6,
+        I32 = 8,
+        I64 = 10,
+        String = 11,
+        Struct = 12,
+        Map = 13,
+        Set = 14,
+        List = 15
+    }
+}
\ No newline at end of file