Thrift: C# Bindings.

Summary:
C# generator, library, and MS Build task contributed by imeem.

Reviewed By: mcslee

Test Plan:
Built the Thrift compiler and generated some C# code.
I'd love to say I installed Mono or Portable.NET and built the C# code,
but I did not.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665421 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/csharp/src/Protocol/TProtocol.cs b/lib/csharp/src/Protocol/TProtocol.cs
new file mode 100644
index 0000000..f46b6d1
--- /dev/null
+++ b/lib/csharp/src/Protocol/TProtocol.cs
@@ -0,0 +1,75 @@
+//
+//  TProtocol.cs
+//
+//  Begin:  Aug 19, 2007
+//  Authors: 
+//		Todd Berman <tberman@imeem.com>
+//
+//  Distributed under the Thrift Software License
+//
+//  See accompanying file LICENSE or visit the Thrift site at:
+//  http://developers.facebook.com/thrift/using
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Thrift.Transport;
+
+namespace Thrift.Protocol
+{
+	public abstract class TProtocol
+	{
+		protected TTransport trans;
+
+		protected TProtocol(TTransport trans)
+		{
+			this.trans = trans;
+		}
+
+		public TTransport Transport
+		{
+			get { return trans; }
+		}
+
+		public abstract void WriteMessageBegin(TMessage message);
+		public abstract void WriteMessageEnd();
+		public abstract void WriteStructBegin(TStruct struc);
+		public abstract void WriteStructEnd();
+		public abstract void WriteFieldBegin(TField field);
+		public abstract void WriteFieldEnd();
+		public abstract void WriteFieldStop();
+		public abstract void WriteMapBegin(TMap map);
+		public abstract void WriteMapEnd();
+		public abstract void WriteListBegin(TList list);
+		public abstract void WriteListEnd();
+		public abstract void WriteSetBegin(TSet set);
+		public abstract void WriteSetEnd();
+		public abstract void WriteBool(bool b);
+		public abstract void WriteByte(byte b);
+		public abstract void WriteI16(short i16);
+		public abstract void WriteI32(int i32);
+		public abstract void WriteI64(long i64);
+		public abstract void WriteDouble(double d);
+		public abstract void WriteString(string s);
+
+		public abstract TMessage ReadMessageBegin();
+		public abstract void ReadMessageEnd();
+		public abstract TStruct ReadStructBegin();
+		public abstract void ReadStructEnd();
+		public abstract TField ReadFieldBegin();
+		public abstract void ReadFieldEnd();
+		public abstract TMap ReadMapBegin();
+		public abstract void ReadMapEnd();
+		public abstract TList ReadListBegin();
+		public abstract void ReadListEnd();
+		public abstract TSet ReadSetBegin();
+		public abstract void ReadSetEnd();
+		public abstract bool ReadBool();
+		public abstract byte ReadByte();
+		public abstract short ReadI16();
+		public abstract int ReadI32();
+		public abstract long ReadI64();
+		public abstract double ReadDouble();
+		public abstract string ReadString();
+	}
+}