diff options
Diffstat (limited to 'src/csharp/MathClient')
-rw-r--r-- | src/csharp/MathClient/.gitignore | 1 | ||||
-rw-r--r-- | src/csharp/MathClient/MathClient.cs | 27 | ||||
-rw-r--r-- | src/csharp/MathClient/MathClient.csproj | 52 | ||||
-rw-r--r-- | src/csharp/MathClient/Properties/AssemblyInfo.cs | 22 |
4 files changed, 102 insertions, 0 deletions
diff --git a/src/csharp/MathClient/.gitignore b/src/csharp/MathClient/.gitignore new file mode 100644 index 0000000000..ba077a4031 --- /dev/null +++ b/src/csharp/MathClient/.gitignore @@ -0,0 +1 @@ +bin diff --git a/src/csharp/MathClient/MathClient.cs b/src/csharp/MathClient/MathClient.cs new file mode 100644 index 0000000000..45222abb79 --- /dev/null +++ b/src/csharp/MathClient/MathClient.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.InteropServices; +using Google.GRPC.Core; +using System.Threading; + +namespace math +{ + class MathClient + { + public static void Main (string[] args) + { + using (Channel channel = new Channel("127.0.0.1:23456")) + { + MathGrpc.IMathServiceClient stub = new MathGrpc.MathServiceClientStub(channel); + MathExamples.DivExample(stub); + + MathExamples.FibExample(stub); + + MathExamples.SumExample(stub); + + MathExamples.DivManyExample(stub); + } + + GrpcEnvironment.Shutdown(); + } + } +} diff --git a/src/csharp/MathClient/MathClient.csproj b/src/csharp/MathClient/MathClient.csproj new file mode 100644 index 0000000000..74213653d2 --- /dev/null +++ b/src/csharp/MathClient/MathClient.csproj @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{61ECB8EE-0C96-4F8E-B187-8E4D227417C0}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>GrpcDemo</RootNamespace> + <AssemblyName>GrpcDemo</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="MathClient.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <ItemGroup> + <ProjectReference Include="..\GrpcApi\GrpcApi.csproj"> + <Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project> + <Name>GrpcApi</Name> + </ProjectReference> + <ProjectReference Include="..\GrpcCore\GrpcCore.csproj"> + <Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project> + <Name>GrpcCore</Name> + </ProjectReference> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/csharp/MathClient/Properties/AssemblyInfo.cs b/src/csharp/MathClient/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..f521cd63f0 --- /dev/null +++ b/src/csharp/MathClient/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle ("MathClient")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("jtattermusch")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion ("1.0.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + |