Ver Fonte

建立WCF Client库,需要连接server直接引用client库即可

tanghai há 12 anos atrás
pai
commit
77f1a5548a

+ 4 - 4
CSharp/App/BossClient/Properties/AssemblyInfo.cs

@@ -4,12 +4,12 @@ using System.Runtime.InteropServices;
 
 // 有关程序集的常规信息通过以下
 // 特性集控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("RealmClient")]
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("BossClient")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("RealmClient")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BossClient")]
 [assembly: AssemblyCopyright("Copyright ©  2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

+ 1 - 1
CSharp/App/Editor/app.config

@@ -31,7 +31,7 @@
 		</bindings>
 		<client>
 			<endpoint address="net.tcp://localhost:10000/Calculator/" binding="netTcpBinding"
-                bindingConfiguration="NetTcpBinding_Calculator" contract="Realm.Calculator"
+                bindingConfiguration="NetTcpBinding_Calculator" contract="Proxy.Calculator"
                 name="NetTcpBinding_Calculator">
 			</endpoint>
 		</client>

+ 0 - 13
CSharp/App/Modules/WCFClient/App.config

@@ -1,16 +1,3 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <configuration>
-    <system.serviceModel>
-        <bindings>
-            <netTcpBinding>
-                <binding name="NetTcpBinding_Calculator" />
-            </netTcpBinding>
-        </bindings>
-        <client>
-            <endpoint address="net.tcp://localhost:10000/Calculator/" binding="netTcpBinding"
-                bindingConfiguration="NetTcpBinding_Calculator" contract="Realm.Calculator"
-                name="NetTcpBinding_Calculator">
-            </endpoint>
-        </client>
-    </system.serviceModel>
 </configuration>

+ 3 - 33
CSharp/App/Modules/WCFClient/WCFClient.csproj

@@ -70,11 +70,6 @@
     <Reference Include="PresentationFramework" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Service References\Realm\Reference.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Reference.svcmap</DependentUpon>
-    </Compile>
     <Compile Include="WCFClientViewModel.cs" />
     <Page Include="WCFClientView.xaml">
       <Generator>MSBuild:Compile</Generator>
@@ -93,18 +88,11 @@
     <None Include="App.config" />
     <None Include="Packages.config" />
     <AppDesigner Include="Properties\" />
-    <None Include="Service References\Realm\service.wsdl" />
-    <None Include="Service References\Realm\service.xsd">
-      <SubType>Designer</SubType>
-    </None>
-    <None Include="Service References\Realm\service1.xsd">
-      <SubType>Designer</SubType>
-    </None>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\..\Contract\RealmContract\RealmContract.csproj">
-      <Project>{E62B0633-1767-44A0-9479-C8E9D19DA4B8}</Project>
-      <Name>RealmContract</Name>
+    <ProjectReference Include="..\..\..\Client\RealmClient\RealmClient.csproj">
+      <Project>{3ef3ae01-5ef3-4c5c-ab49-87bb9d06c007}</Project>
+      <Name>RealmClient</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\..\Platform\Log\Log.csproj">
       <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
@@ -115,24 +103,6 @@
       <Name>Infrastructure</Name>
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup>
-    <WCFMetadata Include="Service References\" />
-  </ItemGroup>
-  <ItemGroup>
-    <WCFMetadataStorage Include="Service References\Realm\" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Service References\Realm\configuration91.svcinfo" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Service References\Realm\configuration.svcinfo" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Service References\Realm\Reference.svcmap">
-      <Generator>WCF Proxy Generator</Generator>
-      <LastGenOutput>Reference.cs</LastGenOutput>
-    </None>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 1 - 1
CSharp/App/Modules/WCFClient/WCFClientView.xaml.cs

@@ -1,7 +1,7 @@
 using System.ComponentModel.Composition;
 using Infrastructure;
 using Log;
-using WCFClient.Realm;
+using RealmClient.Proxy;
 
 namespace Modules.WCFClient
 {

+ 21 - 1
CSharp/CSharp.sln

@@ -57,7 +57,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClient", "App\Modules\WC
 		{15B3E0D2-6217-493A-A690-158C497F5318} = {15B3E0D2-6217-493A-A690-158C497F5318}
 	EndProjectSection
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Realm", "Server\Realm\Realm.csproj", "{15B3E0D2-6217-493A-A690-158C497F5318}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealmServer", "Server\RealmServer\RealmServer.csproj", "{15B3E0D2-6217-493A-A690-158C497F5318}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{5CE37ED4-1D86-4407-9471-DA41975FDA53}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealmClient", "Client\RealmClient\RealmClient.csproj", "{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}"
+	ProjectSection(ProjectDependencies) = postProject
+		{15B3E0D2-6217-493A-A690-158C497F5318} = {15B3E0D2-6217-493A-A690-158C497F5318}
+	EndProjectSection
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -291,6 +298,18 @@ Global
 		{15B3E0D2-6217-493A-A690-158C497F5318}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{15B3E0D2-6217-493A-A690-158C497F5318}.Release|Win32.ActiveCfg = Release|Any CPU
 		{15B3E0D2-6217-493A-A690-158C497F5318}.Release|x86.ActiveCfg = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|Win32.ActiveCfg = Release|Any CPU
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -315,5 +334,6 @@ Global
 		{87537C92-B2C7-4E46-A6FB-02B73215C100} = {FD5F443E-CBEE-443E-821D-C47C86E09534}
 		{15B3E0D2-6217-493A-A690-158C497F5318} = {4FF1FBF3-F552-4D3D-AD97-E29385069206}
 		{E62B0633-1767-44A0-9479-C8E9D19DA4B8} = {01501C44-C95B-45B7-A898-76B4A7AC4EE8}
+		{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007} = {5CE37ED4-1D86-4407-9471-DA41975FDA53}
 	EndGlobalSection
 EndGlobal

+ 16 - 0
CSharp/Client/RealmClient/App.config

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <system.serviceModel>
+        <bindings>
+            <netTcpBinding>
+                <binding name="NetTcpBinding_Calculator" />
+            </netTcpBinding>
+        </bindings>
+        <client>
+            <endpoint address="net.tcp://localhost:10000/Calculator/" binding="netTcpBinding"
+                bindingConfiguration="NetTcpBinding_Calculator" contract="Proxy.Calculator"
+                name="NetTcpBinding_Calculator">
+            </endpoint>
+        </client>
+    </system.serviceModel>
+</configuration>

+ 36 - 0
CSharp/Client/RealmClient/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的常规信息通过以下
+// 特性集控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("RealmClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("RealmClient")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 使此程序集中的类型
+// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("fc44946d-4f5d-4b64-9c7e-209cc2db4a7b")]
+
+// 程序集的版本信息由下面四个值组成:
+//
+//      主版本
+//      次版本 
+//      生成号
+//      修订号
+//
+// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 87 - 0
CSharp/Client/RealmClient/RealmClient.csproj

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{3EF3AE01-5EF3-4C5C-AB49-87BB9D06C007}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>RealmClient</RootNamespace>
+    <AssemblyName>RealmClient</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\Bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Service References\Proxy\Reference.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Reference.svcmap</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+    <None Include="Service References\Proxy\service.wsdl" />
+    <None Include="Service References\Proxy\service.xsd">
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="Service References\Proxy\service1.xsd">
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Service References\" />
+  </ItemGroup>
+  <ItemGroup>
+    <WCFMetadataStorage Include="Service References\Proxy\" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Service References\Proxy\configuration91.svcinfo" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Service References\Proxy\configuration.svcinfo" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Service References\Proxy\Reference.svcmap">
+      <Generator>WCF Proxy Generator</Generator>
+      <LastGenOutput>Reference.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 4 - 4
CSharp/App/Modules/WCFClient/Service References/Realm/Reference.cs → CSharp/Client/RealmClient/Service References/Proxy/Reference.cs

@@ -8,11 +8,11 @@
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace WCFClient.Realm {
+namespace RealmClient.Proxy {
     
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
-    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="Realm.Calculator")]
+    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="Proxy.Calculator")]
     public interface Calculator {
         
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Calculator/Add", ReplyAction="http://tempuri.org/Calculator/AddResponse")]
@@ -23,12 +23,12 @@ namespace WCFClient.Realm {
     }
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
-    public interface CalculatorChannel : WCFClient.Realm.Calculator, System.ServiceModel.IClientChannel {
+    public interface CalculatorChannel : RealmClient.Proxy.Calculator, System.ServiceModel.IClientChannel {
     }
     
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
-    public partial class CalculatorClient : System.ServiceModel.ClientBase<WCFClient.Realm.Calculator>, WCFClient.Realm.Calculator {
+    public partial class CalculatorClient : System.ServiceModel.ClientBase<RealmClient.Proxy.Calculator>, RealmClient.Proxy.Calculator {
         
         public CalculatorClient() {
         }

+ 4 - 4
CSharp/App/Modules/WCFClient/Service References/Realm/Reference.svcmap → CSharp/Client/RealmClient/Service References/Proxy/Reference.svcmap

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="ccc3985e-1e9b-4fd5-ba34-cd058f16ffa6" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
+<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="046e03ef-098d-415f-bc5b-324d8271abdc" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
   <ClientOptions>
     <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
     <GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
@@ -22,9 +22,9 @@
     <MetadataSource Address="net.tcp://localhost:10000/Calculator/mex" Protocol="mex" SourceId="1" />
   </MetadataSources>
   <Metadata>
-    <MetadataFile FileName="service.wsdl" MetadataType="Wsdl" ID="4cb4e3a0-e6d8-4d4b-a9fe-30c526a9798b" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
-    <MetadataFile FileName="service.xsd" MetadataType="Schema" ID="fb8c361b-1c6f-4abe-b15b-f5dbfc675f0c" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
-    <MetadataFile FileName="service1.xsd" MetadataType="Schema" ID="db147784-9ac9-4a04-8baf-660b9c140db4" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
+    <MetadataFile FileName="service.wsdl" MetadataType="Wsdl" ID="015fa908-41d5-4340-8aed-124e8f91309b" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
+    <MetadataFile FileName="service.xsd" MetadataType="Schema" ID="407b84ac-1459-4437-bf70-ab529fcd610a" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
+    <MetadataFile FileName="service1.xsd" MetadataType="Schema" ID="cf329b97-d9e7-44e8-bc81-f680849efddc" SourceId="1" SourceUrl="net.tcp://localhost:10000/Calculator/mex" />
   </Metadata>
   <Extensions>
     <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />

+ 1 - 1
CSharp/App/Modules/WCFClient/Service References/Realm/configuration.svcinfo → CSharp/Client/RealmClient/Service References/Proxy/configuration.svcinfo

@@ -5,6 +5,6 @@
     <binding digest="System.ServiceModel.Configuration.NetTcpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;NetTcpBinding_Calculator&quot; /&gt;" bindingType="netTcpBinding" name="NetTcpBinding_Calculator" />
   </bindings>
   <endpoints>
-    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://localhost:10000/Calculator/&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_Calculator&quot; contract=&quot;Realm.Calculator&quot; name=&quot;NetTcpBinding_Calculator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;windows\tanghai&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://localhost:10000/Calculator/&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_Calculator&quot; contract=&quot;Realm.Calculator&quot; name=&quot;NetTcpBinding_Calculator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;windows\tanghai&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" contractName="Realm.Calculator" name="NetTcpBinding_Calculator" />
+    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://localhost:10000/Calculator/&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_Calculator&quot; contract=&quot;Proxy.Calculator&quot; name=&quot;NetTcpBinding_Calculator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;windows\tanghai&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://localhost:10000/Calculator/&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_Calculator&quot; contract=&quot;Proxy.Calculator&quot; name=&quot;NetTcpBinding_Calculator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;windows\tanghai&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" contractName="Proxy.Calculator" name="NetTcpBinding_Calculator" />
   </endpoints>
 </configurationSnapshot>

+ 3 - 3
CSharp/App/Modules/WCFClient/Service References/Realm/configuration91.svcinfo → CSharp/Client/RealmClient/Service References/Proxy/configuration91.svcinfo

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="6qjZa3j/VFvcWDbJvPq3YVrmgnY=">
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="v11ZQuH971ECpE/gUTaa4A49Bk0=">
   <bindingConfigurations>
     <bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_Calculator">
       <properties>
@@ -118,7 +118,7 @@
     </bindingConfiguration>
   </bindingConfigurations>
   <endpoints>
-    <endpoint name="NetTcpBinding_Calculator" contract="Realm.Calculator" bindingType="netTcpBinding" address="net.tcp://localhost:10000/Calculator/" bindingConfiguration="NetTcpBinding_Calculator">
+    <endpoint name="NetTcpBinding_Calculator" contract="Proxy.Calculator" bindingType="netTcpBinding" address="net.tcp://localhost:10000/Calculator/" bindingConfiguration="NetTcpBinding_Calculator">
       <properties>
         <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue>net.tcp://localhost:10000/Calculator/</serializedValue>
@@ -133,7 +133,7 @@
           <serializedValue>NetTcpBinding_Calculator</serializedValue>
         </property>
         <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>Realm.Calculator</serializedValue>
+          <serializedValue>Proxy.Calculator</serializedValue>
         </property>
         <property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>

+ 0 - 0
CSharp/App/Modules/WCFClient/Service References/Realm/service.wsdl → CSharp/Client/RealmClient/Service References/Proxy/service.wsdl


+ 0 - 0
CSharp/App/Modules/WCFClient/Service References/Realm/service.xsd → CSharp/Client/RealmClient/Service References/Proxy/service.xsd


+ 0 - 0
CSharp/App/Modules/WCFClient/Service References/Realm/service1.xsd → CSharp/Client/RealmClient/Service References/Proxy/service1.xsd


+ 0 - 0
CSharp/Server/Realm/App.config → CSharp/Server/RealmServer/App.config


+ 0 - 0
CSharp/Server/Realm/Calculator.cs → CSharp/Server/RealmServer/Calculator.cs


+ 36 - 36
CSharp/Server/Realm/Properties/AssemblyInfo.cs → CSharp/Server/RealmServer/Properties/AssemblyInfo.cs

@@ -1,36 +1,36 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的常规信息通过下列特性集
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Realm")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("Realm")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 False 使此程序集中的类型
-// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
-// 则将该类型上的 ComVisible 特性设置为 True。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("c9500b75-5f3b-4036-9146-b67935272401")]
-
-// 程序集的版本信息由下列四个值组成:
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-// 您可以指定所有值,也可以按照如下所示通过使用“*”来使用
-//“生成号”和“修订号”的默认值:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的常规信息通过下列特性集
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Realm")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Realm")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 False 使此程序集中的类型
+// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 True。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("c9500b75-5f3b-4036-9146-b67935272401")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+// 您可以指定所有值,也可以按照如下所示通过使用“*”来使用
+//“生成号”和“修订号”的默认值:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 1 - 1
CSharp/Server/Realm/Realm.csproj → CSharp/Server/RealmServer/RealmServer.csproj

@@ -20,7 +20,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
+    <OutputPath>..\..\Bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>