lith 4 gadi atpakaļ
vecāks
revīzija
1bd148cd3a

+ 1 - 1
02.Gateway/ServiceAdaptor.NetCore.Gateway/GatewayHost.cs

@@ -17,7 +17,7 @@ namespace ServiceAdaptor.NetCore.Gateway
 
         static string prefixOfCopyIpToHeader = Vit.Core.Util.ConfigurationManager.ConfigurationManager.Instance.GetStringByPath("Gateway.prefixOfCopyIpToHeader");
 
-        static string ResponseDefaultContentType = (ConfigurationManager.Instance.GetStringByPath("Gateway.ResponseDefaultContentType") ?? ("application/json; charset=" + Vit.Core.Module.Serialization.Serialization.Instance.charset));
+        static string ResponseDefaultContentType = (ConfigurationManager.Instance.GetStringByPath("Gateway.ResponseDefaultContentType") ?? ("application/json; charset=" + Vit.Core.Module.Serialization.Serialization_Newtonsoft.Instance.charset));
         static async Task Bridge(HttpContext context)
         {
             try

+ 3 - 3
02.Gateway/ServiceAdaptor.NetCore.Gateway/ServiceAdaptor.NetCore.Gateway.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>1.1.416</Version>
+    <Version>1.1.489</Version>
     <Description>https://github.com/serset/ServiceAdaptor.NetCore/tree/1.1/release</Description>
   </PropertyGroup>
 
@@ -19,8 +19,8 @@
   <ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.App" />
    
-    <PackageReference Include="Sers.Core" Version="2.1.1.499" />
-    <PackageReference Include="Vit.WebHost" Version="2.1.1.499" />
+    <PackageReference Include="Sers.Core" Version="2.1.1.593" />
+    <PackageReference Include="Vit.WebHost" Version="2.1.1.593" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore\ServiceAdaptor.NetCore.csproj" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.MinHttp\ServiceAdaptor.NetCore.MinHttp.csproj" />  
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Consul\ServiceAdaptor.NetCore.Consul.csproj" />

+ 1 - 2
11.ServiceProvider/ServiceProvider/ServiceProvider.csproj

@@ -12,7 +12,7 @@
     <PackageReference Include="Microsoft.AspNetCore.App" />
  
     <!-- Sers -->
-    <PackageReference Include="Sers.Core" Version="2.1.1.499" />
+    <PackageReference Include="Sers.Core" Version="2.1.1.593" />
   </ItemGroup>
 
   <ItemGroup>
@@ -20,7 +20,6 @@
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.MinHttp\ServiceAdaptor.NetCore.MinHttp.csproj" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Consul\ServiceAdaptor.NetCore.Consul.csproj" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Sers\ServiceAdaptor.NetCore.Sers.csproj" />
-    <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Be.Eureka\ServiceAdaptor.NetCore.Be.Eureka.csproj" />
   </ItemGroup>
   
   

+ 1 - 2
12.ServiceConsumer/ServiceConsumer/ServiceConsumer.csproj

@@ -11,7 +11,7 @@
   <ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.App" /> 
     <!-- Sers -->
-    <PackageReference Include="Sers.Core" Version="2.1.1.499" />
+    <PackageReference Include="Sers.Core" Version="2.1.1.593" />
   </ItemGroup>
 
   <ItemGroup>
@@ -19,7 +19,6 @@
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.MinHttp\ServiceAdaptor.NetCore.MinHttp.csproj" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Consul\ServiceAdaptor.NetCore.Consul.csproj" />
     <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Sers\ServiceAdaptor.NetCore.Sers.csproj" />
-    <ProjectReference Include="..\..\Library\ServiceAdaptor.NetCore.Be.Eureka\ServiceAdaptor.NetCore.Be.Eureka.csproj" />
   </ItemGroup>
 
 

+ 2 - 2
Library/ServiceAdaptor.NetCore.Consul/ServiceAdaptor.NetCore.Consul.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>1.1.416</Version>
+    <Version>1.1.489</Version>
     <Description>https://github.com/serset/ServiceAdaptor.NetCore/tree/1.1/release</Description>
   </PropertyGroup>
 
@@ -12,7 +12,7 @@
 
   <ItemGroup>
     <PackageReference Include="Consul" Version="0.7.2.6" /> 
-    <PackageReference Include="Vit.WebHost" Version="2.1.1.499" />
+    <PackageReference Include="Vit.WebHost" Version="2.1.1.593" />
   </ItemGroup>
 
 

+ 1 - 1
Library/ServiceAdaptor.NetCore.MinHttp/ServiceAdaptor.NetCore.MinHttp.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>1.1.416</Version>
+    <Version>1.1.489</Version>
     <Description>https://github.com/serset/ServiceAdaptor.NetCore/tree/1.1/release</Description>
   </PropertyGroup>
 

+ 14 - 14
Library/ServiceAdaptor.NetCore.Sers/ApiClient.cs

@@ -52,7 +52,7 @@ namespace ServiceAdaptor.NetCore.Sers
 
 
             #region init rpc
-            Action<IRpcContextData> InitRpc = null;
+            Action<RpcContextData> InitRpc = null;
             if (req.headers == null)
             {
                 req.headers = new Dictionary<string, string>();
@@ -60,10 +60,11 @@ namespace ServiceAdaptor.NetCore.Sers
             req.headers.IDictionaryTryAdd("Content-Type", "application/json");            
             InitRpc =
                 rpcData =>
-                {                  
+                {
+                    var header = rpcData.http.Headers();
                     foreach (var item in req.headers)
                     {
-                        rpcData.http_header_Set(item.Key, item.Value);
+                        header[item.Key]= item.Value;
                     }
                 };
 
@@ -77,14 +78,13 @@ namespace ServiceAdaptor.NetCore.Sers
             ApiMessage response = global::Sers.Core.Module.Api.ApiClient.CallRemoteApi(request);
 
             #region (x.3)处理回应           
-            var replyRpcData = RpcFactory.CreateRpcContextData();
-            replyRpcData.UnpackOriData(response.rpcContextData_OriData);
+            var replyRpcData = RpcContextData.FromBytes(response.rpcContextData_OriData);             
 
             return new ApiResponse<ReturnType>
             {
-                StatusCode = replyRpcData.http_statusCode_Get() ?? 0,
+                StatusCode = replyRpcData.http.statusCode?? 0,
                 data = response.value_OriData.DeserializeFromArraySegmentByte<ReturnType>(),
-                headers = replyRpcData.http_headers_Get()?.ConvertBySerialize<IDictionary<string, string>>()
+                headers = replyRpcData.http.headers
             };
             #endregion
 
@@ -114,7 +114,7 @@ namespace ServiceAdaptor.NetCore.Sers
             }
 
             #region init rpc
-            Action<IRpcContextData> InitRpc = null;
+            Action<RpcContextData> InitRpc = null;
             if (req.headers == null)
             {
                 req.headers = new Dictionary<string, string>();
@@ -123,10 +123,11 @@ namespace ServiceAdaptor.NetCore.Sers
 
             InitRpc =
                 rpcData =>
-                {                     
+                {
+                    var header = rpcData.http.Headers();
                     foreach (var item in req.headers)
                     {
-                        rpcData.http_header_Set(item.Key, item.Value);
+                        header[item.Key] = item.Value;
                     }
                 };
             #endregion
@@ -137,14 +138,13 @@ namespace ServiceAdaptor.NetCore.Sers
             ApiMessage response = await global::Sers.Core.Module.Api.ApiClient.CallRemoteApiAsync(request);
 
             #region (x.3)处理回应           
-            var replyRpcData = RpcFactory.CreateRpcContextData();
-            replyRpcData.UnpackOriData(response.rpcContextData_OriData);
+            var replyRpcData =  RpcContextData.FromBytes(response.rpcContextData_OriData);
 
             return new ApiResponse<ReturnType>
             {
-                StatusCode = replyRpcData.http_statusCode_Get() ?? 0,
+                StatusCode = replyRpcData.http.statusCode ?? 0,
                 data = response.value_OriData.DeserializeFromArraySegmentByte<ReturnType>(),
-                headers = replyRpcData.http_headers_Get()?.ConvertBySerialize<IDictionary<string, string>>()
+                headers = replyRpcData.http.headers
             };
             #endregion
 

+ 2 - 2
Library/ServiceAdaptor.NetCore.Sers/ServiceAdaptor.NetCore.Sers.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>1.1.416</Version>
+    <Version>1.1.489</Version>
     <Description>https://github.com/serset/ServiceAdaptor.NetCore/tree/1.1/release</Description>
   </PropertyGroup>
 
@@ -16,7 +16,7 @@
 
   <ItemGroup>  
     <!-- Sers --> 
-    <PackageReference Include="Sers.Serslot" Version="2.1.1.499" />
+    <PackageReference Include="Sers.Serslot" Version="2.1.1.593" />
   </ItemGroup>
   
   

+ 2 - 2
Library/ServiceAdaptor.NetCore/ServiceAdaptor.NetCore.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>1.1.416</Version>
+    <Version>1.1.489</Version>
     <Description>https://github.com/serset/ServiceAdaptor.NetCore/tree/1.1/release</Description>
   </PropertyGroup>
 
@@ -15,7 +15,7 @@
     <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.0.0" />
     
     <!-- Sers -->
-    <PackageReference Include="Vit.Core" Version="2.1.1.499" /> 
+    <PackageReference Include="Vit.Core" Version="2.1.1.593" /> 
   </ItemGroup> 
 
  

+ 5 - 5
Publish/05.nuget/01.publish nuget.bat

@@ -32,11 +32,11 @@ dotnet build --configuration Release
 dotnet pack --configuration Release --output ..\..\Publish\05.nuget\nuget  
 cd /d ../
 
-echo 'pack ServiceAdaptor.NetCore.Be.Eureka'
-cd /d ServiceAdaptor.NetCore.Be.Eureka
-dotnet build --configuration Release
-dotnet pack --configuration Release --output ..\..\Publish\05.nuget\nuget  
-cd /d ../
+:: echo 'pack ServiceAdaptor.NetCore.Be.Eureka'
+:: cd /d ServiceAdaptor.NetCore.Be.Eureka
+:: dotnet build --configuration Release
+:: dotnet pack --configuration Release --output ..\..\Publish\05.nuget\nuget  
+:: cd /d ../
 
 cd /d ..\Publish\05.nuget
 

+ 0 - 7
ServiceAdaptor.sln

@@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceAdaptor", "Library\S
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceAdaptor.NetCore", "Library\ServiceAdaptor.NetCore\ServiceAdaptor.NetCore.csproj", "{D5DE0642-524C-43F7-9C19-2830CF953154}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceAdaptor.NetCore.Be.Eureka", "Library\ServiceAdaptor.NetCore.Be.Eureka\ServiceAdaptor.NetCore.Be.Eureka.csproj", "{7FC7E13A-012E-4C81-98E4-9A700E45117E}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceAdaptor.NetCore.Consul", "Library\ServiceAdaptor.NetCore.Consul\ServiceAdaptor.NetCore.Consul.csproj", "{284FE7D7-06AF-437D-A320-18FFCAF73291}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceAdaptor.NetCore.MinHttp", "Library\ServiceAdaptor.NetCore.MinHttp\ServiceAdaptor.NetCore.MinHttp.csproj", "{991E6163-0CD8-40F9-9BDC-75D75E6B8EFF}"
@@ -43,10 +41,6 @@ Global
 		{D5DE0642-524C-43F7-9C19-2830CF953154}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D5DE0642-524C-43F7-9C19-2830CF953154}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D5DE0642-524C-43F7-9C19-2830CF953154}.Release|Any CPU.Build.0 = Release|Any CPU
-		{7FC7E13A-012E-4C81-98E4-9A700E45117E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{7FC7E13A-012E-4C81-98E4-9A700E45117E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{7FC7E13A-012E-4C81-98E4-9A700E45117E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{7FC7E13A-012E-4C81-98E4-9A700E45117E}.Release|Any CPU.Build.0 = Release|Any CPU
 		{284FE7D7-06AF-437D-A320-18FFCAF73291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{284FE7D7-06AF-437D-A320-18FFCAF73291}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{284FE7D7-06AF-437D-A320-18FFCAF73291}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -78,7 +72,6 @@ Global
 	GlobalSection(NestedProjects) = preSolution
 		{8D4408BC-C8AA-4CF0-B35E-7B22105F8F62} = {7AC5E91A-C865-448A-8957-E635D02220D5}
 		{D5DE0642-524C-43F7-9C19-2830CF953154} = {7AC5E91A-C865-448A-8957-E635D02220D5}
-		{7FC7E13A-012E-4C81-98E4-9A700E45117E} = {7AC5E91A-C865-448A-8957-E635D02220D5}
 		{284FE7D7-06AF-437D-A320-18FFCAF73291} = {7AC5E91A-C865-448A-8957-E635D02220D5}
 		{991E6163-0CD8-40F9-9BDC-75D75E6B8EFF} = {7AC5E91A-C865-448A-8957-E635D02220D5}
 		{DA07DAB1-3D67-4C6F-B91A-5212B2B88E3F} = {7AC5E91A-C865-448A-8957-E635D02220D5}