Thrift: Miscellaneous optimizations for C#.
Reviewed By: mcslee
Test Plan: Built it after a future revision.
Revert Plan: ok
Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665464 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/csharp/src/Protocol/TField.cs b/lib/csharp/src/Protocol/TField.cs
index f18381f..9329530 100644
--- a/lib/csharp/src/Protocol/TField.cs
+++ b/lib/csharp/src/Protocol/TField.cs
@@ -16,12 +16,8 @@
namespace Thrift.Protocol
{
- public class TField
+ public struct TField
{
- public TField()
- {
- }
-
public TField(string name, TType type, short id)
{
Name = name;
diff --git a/lib/csharp/src/Protocol/TList.cs b/lib/csharp/src/Protocol/TList.cs
index ff6aa53..72056cb 100644
--- a/lib/csharp/src/Protocol/TList.cs
+++ b/lib/csharp/src/Protocol/TList.cs
@@ -16,12 +16,8 @@
namespace Thrift.Protocol
{
- public class TList
+ public struct TList
{
- public TList()
- {
- }
-
public TList(TType elementType, int count)
{
ElementType = elementType;
diff --git a/lib/csharp/src/Protocol/TMap.cs b/lib/csharp/src/Protocol/TMap.cs
index 495bf7c..586aa4f 100644
--- a/lib/csharp/src/Protocol/TMap.cs
+++ b/lib/csharp/src/Protocol/TMap.cs
@@ -16,12 +16,8 @@
namespace Thrift.Protocol
{
- public class TMap
+ public struct TMap
{
- public TMap()
- {
- }
-
public TMap(TType keyType, TType valueType, int count)
{
KeyType = keyType;
diff --git a/lib/csharp/src/Protocol/TMessage.cs b/lib/csharp/src/Protocol/TMessage.cs
index 60df660..a9522ff 100644
--- a/lib/csharp/src/Protocol/TMessage.cs
+++ b/lib/csharp/src/Protocol/TMessage.cs
@@ -16,12 +16,8 @@
namespace Thrift.Protocol
{
- public class TMessage
+ public struct TMessage
{
- public TMessage()
- {
- }
-
public TMessage(string name, TMessageType type, int seqid)
{
Name = name;
diff --git a/lib/csharp/src/Protocol/TProtocolException.cs b/lib/csharp/src/Protocol/TProtocolException.cs
index 0941a81..db38d88 100644
--- a/lib/csharp/src/Protocol/TProtocolException.cs
+++ b/lib/csharp/src/Protocol/TProtocolException.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Text;
namespace Thrift.Protocol
diff --git a/lib/csharp/src/Protocol/TSet.cs b/lib/csharp/src/Protocol/TSet.cs
index c4c6fc3..1f172e4 100644
--- a/lib/csharp/src/Protocol/TSet.cs
+++ b/lib/csharp/src/Protocol/TSet.cs
@@ -16,12 +16,8 @@
namespace Thrift.Protocol
{
- public class TSet
+ public struct TSet
{
- public TSet()
- {
- }
-
public TSet(TType elementType, int count)
{
ElementType = elementType;
diff --git a/lib/csharp/src/Protocol/TStruct.cs b/lib/csharp/src/Protocol/TStruct.cs
index 88f12df..000ebf1 100644
--- a/lib/csharp/src/Protocol/TStruct.cs
+++ b/lib/csharp/src/Protocol/TStruct.cs
@@ -15,12 +15,8 @@
namespace Thrift.Protocol
{
- public class TStruct
+ public struct TStruct
{
- public TStruct()
- {
- }
-
public TStruct(string name)
{
Name = name;