THRIFT-881. csharp: add csharp to the tutorial
authorBryan Duxbury <bryanduxbury@apache.org>
Fri, 24 Sep 2010 16:47:59 +0000 (16:47 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Fri, 24 Sep 2010 16:47:59 +0000 (16:47 +0000)
This patch adds a tutorial for CSharp. It also moves the 'test' client and server into the tutorial, because they were not being used by the tests.

Patch: Roger Meier

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1000953 13f79535-47bb-0310-9956-ffa450edef68

tutorial/csharp/CsharpClient/CsharpClient.cs [moved from test/csharp/CSharpClient.cs with 89% similarity]
tutorial/csharp/CsharpClient/CsharpClient.csproj [new file with mode: 0644]
tutorial/csharp/CsharpClient/Properties/AssemblyInfo.cs [new file with mode: 0644]
tutorial/csharp/CsharpServer/CsharpServer.cs [moved from test/csharp/CSharpServer.cs with 82% similarity]
tutorial/csharp/CsharpServer/CsharpServer.csproj [new file with mode: 0644]
tutorial/csharp/CsharpServer/Properties/AssemblyInfo.cs [new file with mode: 0644]
tutorial/csharp/tutorial.sln [new file with mode: 0644]

similarity index 89%
rename from test/csharp/CSharpClient.cs
rename to tutorial/csharp/CsharpClient/CsharpClient.cs
index 641d5c9..8ce1085 100644 (file)
@@ -46,9 +46,9 @@ namespace CSharpTutorial
 
                 Work work = new Work();
 
-                work.op = Operation.DIVIDE;
-                work.num1 = 1;
-                work.num2 = 0;
+                work.Op = Operation.DIVIDE;
+                work.Num1 = 1;
+                work.Num2 = 0;
                 try
                 {
                     int quotient = client.calculate(1, work);
@@ -56,12 +56,12 @@ namespace CSharpTutorial
                 }
                 catch (InvalidOperation io)
                 {
-                    Console.WriteLine("Invalid operation: " + io.why);
+                    Console.WriteLine("Invalid operation: " + io.Why);
                 }
 
-                work.op = Operation.SUBTRACT;
-                work.num1 = 15;
-                work.num2 = 10;
+                work.Op = Operation.SUBTRACT;
+                work.Num1 = 15;
+                work.Num2 = 10;
                 try
                 {
                     int diff = client.calculate(1, work);
@@ -69,11 +69,11 @@ namespace CSharpTutorial
                 }
                 catch (InvalidOperation io)
                 {
-                    Console.WriteLine("Invalid operation: " + io.why);
+                    Console.WriteLine("Invalid operation: " + io.Why);
                 }
 
                 SharedStruct log = client.getStruct(1);
-                Console.WriteLine("Check log: {0}", log.value);
+                Console.WriteLine("Check log: {0}", log.Value);
 
                 transport.Close();
             }
diff --git a/tutorial/csharp/CsharpClient/CsharpClient.csproj b/tutorial/csharp/CsharpClient/CsharpClient.csproj
new file mode 100644 (file)
index 0000000..517ad83
--- /dev/null
@@ -0,0 +1,88 @@
+\feff<?xml version="1.0" encoding="utf-8"?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one\r
+  or more contributor license agreements. See the NOTICE file\r
+  distributed with this work for additional information\r
+  regarding copyright ownership. The ASF licenses this file\r
+  to you under the Apache License, Version 2.0 (the\r
+  "License"); you may not use this file except in compliance\r
+  with the License. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing,\r
+  software distributed under the License is distributed on an\r
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+  KIND, either express or implied. See the License for the\r
+  specific language governing permissions and limitations\r
+  under the License.\r
+-->\r
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{18F24087-4760-43DA-ACAB-7B9F0E096B11}</ProjectGuid>\r
+    <OutputType>Exe</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>CsharpClient</RootNamespace>\r
+    <AssemblyName>CsharpClient</AssemblyName>\r
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\r
+    <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Core">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Xml.Linq">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data.DataSetExtensions">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Xml" />\r
+    <Reference Include="Thrift, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+      <SpecificVersion>False</SpecificVersion>\r
+      <HintPath>..\..\..\lib\csharp\src\bin\Release\Thrift.dll</HintPath>\r
+    </Reference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="CsharpClient.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <Compile Include="..\..\gen-csharp\Calculator.cs" />\r
+    <Compile Include="..\..\gen-csharp\Constants.cs" />\r
+    <Compile Include="..\..\gen-csharp\InvalidOperation.cs" />\r
+    <Compile Include="..\..\gen-csharp\Operation.cs" />\r
+    <Compile Include="..\..\gen-csharp\SharedService.cs" />\r
+    <Compile Include="..\..\gen-csharp\SharedStruct.cs" />\r
+    <Compile Include="..\..\gen-csharp\Work.cs" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/tutorial/csharp/CsharpClient/Properties/AssemblyInfo.cs b/tutorial/csharp/CsharpClient/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..ffbc40d
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one\r
+ * or more contributor license agreements. See the NOTICE file\r
+ * distributed with this work for additional information\r
+ * regarding copyright ownership. The ASF licenses this file\r
+ * to you under the Apache License, Version 2.0 (the\r
+ * "License"); you may not use this file except in compliance\r
+ * with the License. You may obtain a copy of the License at\r
+ *\r
+ *   http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing,\r
+ * software distributed under the License is distributed on an\r
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ * KIND, either express or implied. See the License for the\r
+ * specific language governing permissions and limitations\r
+ * under the License.\r
+ */\r
+\r
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following\r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("CsharpClient")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("CsharpClient")]\r
+[assembly: AssemblyCopyright("Copyright © 2010 The Apache Software Foundation")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible\r
+// to COM components.  If you need to access a type in this assembly from\r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("1a461214-fa28-452a-bd1d-d23ca8e947e3")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+//      Major Version\r
+//      Minor Version\r
+//      Build Number\r
+//      Revision\r
+//\r
+// You can specify all the values or you can default the Build and Revision Numbers\r
+// by using the '*' as shown below:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
+[assembly: AssemblyFileVersion("1.0.0.0")]\r
similarity index 82%
rename from test/csharp/CSharpServer.cs
rename to tutorial/csharp/CsharpServer/CsharpServer.cs
index f9ab8fd..0d37c99 100644 (file)
@@ -1,4 +1,4 @@
-/*
+\feff/*
  * 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
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using Thrift.Server;
-using Thrift.Transport;
-
-namespace CSharpTutorial
-{
-    public class CalculatorHandler : Calculator.Iface
-    {
-        Dictionary<int, SharedStruct> log;
-
-        public CalculatorHandler()
-        {
-            log = new Dictionary<int, SharedStruct>();
-        }
-
-        public void ping()
-        {
-            Console.WriteLine("ping()");
-        }
-
-        public int add(int n1, int n2)
-        {
-            Console.WriteLine("add({0},{1})", n1, n2);
-            return n1 + n2;
-        }
-
-        public int calculate(int logid, Work work)
-        {
-            Console.WriteLine("calculate({0}, [{1},{2},{3}])", logid, work.op, work.num1, work.num2);
-            int val = 0;
-            switch (work.op)
-            {
-                case Operation.ADD:
-                    val = work.num1 + work.num2;
-                    break;
-
-                case Operation.SUBTRACT:
-                    val = work.num1 - work.num2;
-                    break;
-
-                case Operation.MULTIPLY:
-                    val = work.num1 * work.num2;
-                    break;
-
-                case Operation.DIVIDE:
-                    if (work.num2 == 0)
-                    {
-                        InvalidOperation io = new InvalidOperation();
-                        io.what = (int)work.op;
-                        io.why = "Cannot divide by 0";
-                        throw io;
-                    }
-                    val = work.num1 / work.num2;
-                    break;
-
-                default:
-                    {
-                        InvalidOperation io = new InvalidOperation();
-                        io.what = (int)work.op;
-                        io.why = "Unknown operation";
-                        throw io;
-                    }
-            }
-
-            SharedStruct entry = new SharedStruct();
-            entry.key = logid;
-            entry.value = val.ToString();
-            log[logid] = entry;
-
-            return val;
-        }
-
-        public SharedStruct getStruct(int key)
-        {
-            Console.WriteLine("getStruct({0})", key);
-            return log[key];
-        }
-
-        public void zip()
-        {
-            Console.WriteLine("zip()");
-        }
-    }
-
-    public class CSharpServer
-    {
-        public static void Main()
-        {
-            try
-            {
-                CalculatorHandler handler = new CalculatorHandler();
-                Calculator.Processor processor = new Calculator.Processor(handler);
-                TServerTransport serverTransport = new TServerSocket(9090);
-                TServer server = new TSimpleServer(processor, serverTransport);
-
-                // Use this for a multithreaded server
-                // server = new TThreadPoolServer(processor, serverTransport);
-
-                Console.WriteLine("Starting the server...");
-                server.Serve();
-            }
-            catch (Exception x)
-            {
-                Console.WriteLine(x.StackTrace);
-            }
-            Console.WriteLine("done.");
-        }
-    }
-}
+ */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using Thrift.Server;\r
+using Thrift.Transport;\r
+\r
+namespace CSharpTutorial\r
+{\r
+    public class CalculatorHandler : Calculator.Iface\r
+    {\r
+        Dictionary<int, SharedStruct> log;\r
+\r
+        public CalculatorHandler()\r
+        {\r
+            log = new Dictionary<int, SharedStruct>();\r
+        }\r
+\r
+        public void ping()\r
+        {\r
+            Console.WriteLine("ping()");\r
+        }\r
+\r
+        public int add(int n1, int n2)\r
+        {\r
+            Console.WriteLine("add({0},{1})", n1, n2);\r
+            return n1 + n2;\r
+        }\r
+\r
+        public int calculate(int logid, Work work)\r
+        {\r
+            Console.WriteLine("calculate({0}, [{1},{2},{3}])", logid, work.Op, work.Num1, work.Num2);\r
+            int val = 0;\r
+            switch (work.Op)\r
+            {\r
+                case Operation.ADD:\r
+                    val = work.Num1 + work.Num2;\r
+                    break;\r
+\r
+                case Operation.SUBTRACT:\r
+                    val = work.Num1 - work.Num2;\r
+                    break;\r
+\r
+                case Operation.MULTIPLY:\r
+                    val = work.Num1 * work.Num2;\r
+                    break;\r
+\r
+                case Operation.DIVIDE:\r
+                    if (work.Num2 == 0)\r
+                    {\r
+                        InvalidOperation io = new InvalidOperation();\r
+                        io.What = (int)work.Op;\r
+                        io.Why = "Cannot divide by 0";\r
+                        throw io;\r
+                    }\r
+                    val = work.Num1 / work.Num2;\r
+                    break;\r
+\r
+                default:\r
+                    {\r
+                        InvalidOperation io = new InvalidOperation();\r
+                        io.What = (int)work.Op;\r
+                        io.Why = "Unknown operation";\r
+                        throw io;\r
+                    }\r
+            }\r
+\r
+            SharedStruct entry = new SharedStruct();\r
+            entry.Key = logid;\r
+            entry.Value = val.ToString();\r
+            log[logid] = entry;\r
+\r
+            return val;\r
+        }\r
+\r
+        public SharedStruct getStruct(int key)\r
+        {\r
+            Console.WriteLine("getStruct({0})", key);\r
+            return log[key];\r
+        }\r
+\r
+        public void zip()\r
+        {\r
+            Console.WriteLine("zip()");\r
+        }\r
+    }\r
+\r
+    public class CSharpServer\r
+    {\r
+        public static void Main()\r
+        {\r
+            try\r
+            {\r
+                CalculatorHandler handler = new CalculatorHandler();\r
+                Calculator.Processor processor = new Calculator.Processor(handler);\r
+                TServerTransport serverTransport = new TServerSocket(9090);\r
+                TServer server = new TSimpleServer(processor, serverTransport);\r
+\r
+                // Use this for a multithreaded server\r
+                // server = new TThreadPoolServer(processor, serverTransport);\r
+\r
+                Console.WriteLine("Starting the server...");\r
+                server.Serve();\r
+            }\r
+            catch (Exception x)\r
+            {\r
+                Console.WriteLine(x.StackTrace);\r
+            }\r
+            Console.WriteLine("done.");\r
+        }\r
+    }\r
+}\r
diff --git a/tutorial/csharp/CsharpServer/CsharpServer.csproj b/tutorial/csharp/CsharpServer/CsharpServer.csproj
new file mode 100644 (file)
index 0000000..aa2ac15
--- /dev/null
@@ -0,0 +1,88 @@
+\feff<?xml version="1.0" encoding="utf-8"?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one\r
+  or more contributor license agreements. See the NOTICE file\r
+  distributed with this work for additional information\r
+  regarding copyright ownership. The ASF licenses this file\r
+  to you under the Apache License, Version 2.0 (the\r
+  "License"); you may not use this file except in compliance\r
+  with the License. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing,\r
+  software distributed under the License is distributed on an\r
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+  KIND, either express or implied. See the License for the\r
+  specific language governing permissions and limitations\r
+  under the License.\r
+-->\r
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{66707BAE-BBF9-4F03-B53E-BE3AD58322F8}</ProjectGuid>\r
+    <OutputType>Exe</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>CsharpServer</RootNamespace>\r
+    <AssemblyName>CsharpServer</AssemblyName>\r
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\r
+    <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Core">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Xml.Linq">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data.DataSetExtensions">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Xml" />\r
+    <Reference Include="Thrift, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+      <SpecificVersion>False</SpecificVersion>\r
+      <HintPath>..\..\..\lib\csharp\src\bin\Release\Thrift.dll</HintPath>\r
+    </Reference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="CsharpServer.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <Compile Include="..\..\gen-csharp\Calculator.cs" />\r
+    <Compile Include="..\..\gen-csharp\Constants.cs" />\r
+    <Compile Include="..\..\gen-csharp\InvalidOperation.cs" />\r
+    <Compile Include="..\..\gen-csharp\Operation.cs" />\r
+    <Compile Include="..\..\gen-csharp\SharedService.cs" />\r
+    <Compile Include="..\..\gen-csharp\SharedStruct.cs" />\r
+    <Compile Include="..\..\gen-csharp\Work.cs" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/tutorial/csharp/CsharpServer/Properties/AssemblyInfo.cs b/tutorial/csharp/CsharpServer/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..9981163
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one\r
+ * or more contributor license agreements. See the NOTICE file\r
+ * distributed with this work for additional information\r
+ * regarding copyright ownership. The ASF licenses this file\r
+ * to you under the Apache License, Version 2.0 (the\r
+ * "License"); you may not use this file except in compliance\r
+ * with the License. You may obtain a copy of the License at\r
+ *\r
+ *   http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing,\r
+ * software distributed under the License is distributed on an\r
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ * KIND, either express or implied. See the License for the\r
+ * specific language governing permissions and limitations\r
+ * under the License.\r
+ */\r
+\r
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following\r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("CsharpServer")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("CsharpServer")]\r
+[assembly: AssemblyCopyright("Copyright © 2010 The Apache Software Foundation")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible\r
+// to COM components.  If you need to access a type in this assembly from\r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("e3b428f4-b2e9-4fc1-8a34-84abc4339860")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+//      Major Version\r
+//      Minor Version\r
+//      Build Number\r
+//      Revision\r
+//\r
+// You can specify all the values or you can default the Build and Revision Numbers\r
+// by using the '*' as shown below:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
+[assembly: AssemblyFileVersion("1.0.0.0")]\r
diff --git a/tutorial/csharp/tutorial.sln b/tutorial/csharp/tutorial.sln
new file mode 100644 (file)
index 0000000..05e4951
--- /dev/null
@@ -0,0 +1,39 @@
+\feff\r
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual C# Express 2008\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thrift", "..\..\lib\csharp\src\Thrift.csproj", "{499EB63C-D74C-47E8-AE48-A2FC94538E9D}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsharpClient", "CsharpClient\CsharpClient.csproj", "{18F24087-4760-43DA-ACAB-7B9F0E096B11}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D} = {499EB63C-D74C-47E8-AE48-A2FC94538E9D}\r
+               {66707BAE-BBF9-4F03-B53E-BE3AD58322F8} = {66707BAE-BBF9-4F03-B53E-BE3AD58322F8}\r
+       EndProjectSection\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsharpServer", "CsharpServer\CsharpServer.csproj", "{66707BAE-BBF9-4F03-B53E-BE3AD58322F8}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D} = {499EB63C-D74C-47E8-AE48-A2FC94538E9D}\r
+       EndProjectSection\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {499EB63C-D74C-47E8-AE48-A2FC94538E9D}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {18F24087-4760-43DA-ACAB-7B9F0E096B11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {18F24087-4760-43DA-ACAB-7B9F0E096B11}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {18F24087-4760-43DA-ACAB-7B9F0E096B11}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {18F24087-4760-43DA-ACAB-7B9F0E096B11}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {66707BAE-BBF9-4F03-B53E-BE3AD58322F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {66707BAE-BBF9-4F03-B53E-BE3AD58322F8}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {66707BAE-BBF9-4F03-B53E-BE3AD58322F8}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {66707BAE-BBF9-4F03-B53E-BE3AD58322F8}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r