From f4c386f994434cca7ce96a19dbe6c6e5f3948f9f Mon Sep 17 00:00:00 2001 From: neuecc Date: Mon, 5 Jun 2017 22:06:11 +0900 Subject: [PATCH] ready for 0.5.0 --- MagicOnion.sln | 7 + nuget/MagicOnion.HttpGateway.nuspec | 32 +- nuget/MagicOnion.nuspec | 31 +- nuget/push.bat | 4 +- sandbox/Sandbox.ConsoleServer/App.config | 74 ++++- .../Sandbox.ConsoleServer.csproj | 141 ++++---- sandbox/Sandbox.ConsoleServer/packages.config | 58 ++-- sandbox/Sandbox.NetCoreApp/Program.cs | 72 +++++ .../Sandbox.NetCoreApp.csproj | 17 + .../CodeAnalysis/Definitions.cs | 2 +- .../CodeAnalysis/MethodCollector.cs | 6 +- .../Generator/TemplatePartials.cs | 4 +- src/MagicOnion.CodeGenerator/Program.cs | 2 +- .../MagicOnion.HttpGateway.csproj | 301 ++++-------------- .../MagicOnionHttpGatewayMiddleware.cs | 7 +- .../Properties/AssemblyInfo.cs | 36 --- .../Swagger/SwaggerDefinitionBuilder.cs | 19 +- src/MagicOnion/MagicOnion.csproj | 6 +- src/MagicOnion/Server/MagicOnionEngine.cs | 3 + src/MagicOnion/packages.config | 12 - 20 files changed, 386 insertions(+), 448 deletions(-) create mode 100644 sandbox/Sandbox.NetCoreApp/Program.cs create mode 100644 sandbox/Sandbox.NetCoreApp/Sandbox.NetCoreApp.csproj delete mode 100644 src/MagicOnion.HttpGateway/Properties/AssemblyInfo.cs delete mode 100644 src/MagicOnion/packages.config diff --git a/MagicOnion.sln b/MagicOnion.sln index 3622fc979..c108bac43 100644 --- a/MagicOnion.sln +++ b/MagicOnion.sln @@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.ConsoleServer2", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicOnion.Tests.NetCore", "tests\MagicOnion.Tests.NetCore\MagicOnion.Tests.NetCore.csproj", "{A0E9C1EA-6E7F-4CF1-81D2-21EAC6ACAE67}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.NetCoreApp", "sandbox\Sandbox.NetCoreApp\Sandbox.NetCoreApp.csproj", "{C2ADB989-07E8-46AC-8495-AE496F69C5C0}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution sandbox\SharedProjectLibrary\SharedProjectLibrary.projitems*{5526fa31-4f38-4ff7-96ee-a73bf495e1ee}*SharedItemsImports = 13 @@ -89,6 +91,10 @@ Global {A0E9C1EA-6E7F-4CF1-81D2-21EAC6ACAE67}.Debug|Any CPU.Build.0 = Debug|Any CPU {A0E9C1EA-6E7F-4CF1-81D2-21EAC6ACAE67}.Release|Any CPU.ActiveCfg = Release|Any CPU {A0E9C1EA-6E7F-4CF1-81D2-21EAC6ACAE67}.Release|Any CPU.Build.0 = Release|Any CPU + {C2ADB989-07E8-46AC-8495-AE496F69C5C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2ADB989-07E8-46AC-8495-AE496F69C5C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2ADB989-07E8-46AC-8495-AE496F69C5C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2ADB989-07E8-46AC-8495-AE496F69C5C0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -105,5 +111,6 @@ Global {A9E28AFD-4FEC-416A-9F85-C64F05605B22} = {7682EFFC-681C-4DCC-B5E7-D8449E42DAC9} {7CF23E57-381B-428D-B44A-D5328A71414B} = {7682EFFC-681C-4DCC-B5E7-D8449E42DAC9} {A0E9C1EA-6E7F-4CF1-81D2-21EAC6ACAE67} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0} + {C2ADB989-07E8-46AC-8495-AE496F69C5C0} = {7682EFFC-681C-4DCC-B5E7-D8449E42DAC9} EndGlobalSection EndGlobal diff --git a/nuget/MagicOnion.HttpGateway.nuspec b/nuget/MagicOnion.HttpGateway.nuspec index dfef4e2a5..3da7463f9 100644 --- a/nuget/MagicOnion.HttpGateway.nuspec +++ b/nuget/MagicOnion.HttpGateway.nuspec @@ -2,29 +2,39 @@ MagicOnion.HttpGateway - 0.4.0-alpha + 0.5.0 MagicOnion.HttpGateway neuecc neuecc https://github.com/neuecc/MagicOnion false HTTP1 JSON Gateway and Swagger Integration for MagicOnion. - update dependency. + Support .NET Core. gRPC, HTTP2 - - - - - - + + - + + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/nuget/MagicOnion.nuspec b/nuget/MagicOnion.nuspec index 42d273a9a..b8b22d42b 100644 --- a/nuget/MagicOnion.nuspec +++ b/nuget/MagicOnion.nuspec @@ -2,29 +2,38 @@ MagicOnion - 0.4.0-alpha + 0.5.0 MagicOnion neuecc neuecc https://github.com/neuecc/MagicOnion false gRPC based HTTP2 RPC Streaming Framework for .NET, .NET Core and Unity. - Add ChannelContext, StreamingContextRepository, StreamingContextGroup. + Support .NET Core. gRPC, HTTP2 - - - - - - - + + + + + + + + + + + + - - + + + + + + \ No newline at end of file diff --git a/nuget/push.bat b/nuget/push.bat index 5b4d9c9f3..baf3c7f64 100644 --- a/nuget/push.bat +++ b/nuget/push.bat @@ -1,2 +1,2 @@ -nuget push MagicOnion.0.4.0-alpha.nupkg -Source https://www.nuget.org/api/v2/package -nuget push MagicOnion.HttpGateway.0.4.0-alpha.nupkg -Source https://www.nuget.org/api/v2/package +nuget push MagicOnion.0.5.0.nupkg -Source https://www.nuget.org/api/v2/package +nuget push MagicOnion.HttpGateway.0.5.0.nupkg -Source https://www.nuget.org/api/v2/package diff --git a/sandbox/Sandbox.ConsoleServer/App.config b/sandbox/Sandbox.ConsoleServer/App.config index 3f6d7f612..5336f4b54 100644 --- a/sandbox/Sandbox.ConsoleServer/App.config +++ b/sandbox/Sandbox.ConsoleServer/App.config @@ -18,7 +18,7 @@ - + @@ -32,6 +32,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/Sandbox.ConsoleServer/Sandbox.ConsoleServer.csproj b/sandbox/Sandbox.ConsoleServer/Sandbox.ConsoleServer.csproj index 4eb5d7914..4c7eb0e3b 100644 --- a/sandbox/Sandbox.ConsoleServer/Sandbox.ConsoleServer.csproj +++ b/sandbox/Sandbox.ConsoleServer/Sandbox.ConsoleServer.csproj @@ -38,111 +38,86 @@ - ..\..\packages\Grpc.Core.1.2.0\lib\net45\Grpc.Core.dll - True + ..\..\packages\Grpc.Core.1.3.6\lib\net45\Grpc.Core.dll - ..\..\packages\MessagePack.1.1.2\lib\net45\MessagePack.dll + ..\..\packages\MessagePack.1.2.3\lib\net45\MessagePack.dll - - ..\..\packages\Microsoft.AspNetCore.Hosting.1.1.0\lib\net451\Microsoft.AspNetCore.Hosting.dll - True + + ..\..\packages\Microsoft.AspNetCore.Hosting.1.1.2\lib\net451\Microsoft.AspNetCore.Hosting.dll - - ..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions.1.1.0\lib\net451\Microsoft.AspNetCore.Hosting.Abstractions.dll - True + + ..\..\packages\Microsoft.AspNetCore.Hosting.Abstractions.1.1.2\lib\net451\Microsoft.AspNetCore.Hosting.Abstractions.dll - - ..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.1.1.0\lib\net451\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - True + + ..\..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.1.1.2\lib\net451\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll - - ..\..\packages\Microsoft.AspNetCore.Http.1.1.0\lib\net451\Microsoft.AspNetCore.Http.dll - True + + ..\..\packages\Microsoft.AspNetCore.Http.1.1.2\lib\net451\Microsoft.AspNetCore.Http.dll - - ..\..\packages\Microsoft.AspNetCore.Http.Abstractions.1.1.0\lib\net451\Microsoft.AspNetCore.Http.Abstractions.dll - True + + ..\..\packages\Microsoft.AspNetCore.Http.Abstractions.1.1.2\lib\net451\Microsoft.AspNetCore.Http.Abstractions.dll - - ..\..\packages\Microsoft.AspNetCore.Http.Extensions.1.1.0\lib\net451\Microsoft.AspNetCore.Http.Extensions.dll - True + + ..\..\packages\Microsoft.AspNetCore.Http.Extensions.1.1.2\lib\net451\Microsoft.AspNetCore.Http.Extensions.dll - - ..\..\packages\Microsoft.AspNetCore.Http.Features.1.1.0\lib\net451\Microsoft.AspNetCore.Http.Features.dll - True + + ..\..\packages\Microsoft.AspNetCore.Http.Features.1.1.2\lib\net451\Microsoft.AspNetCore.Http.Features.dll - - ..\..\packages\Microsoft.AspNetCore.Server.WebListener.1.1.0\lib\net451\Microsoft.AspNetCore.Server.WebListener.dll - True + + ..\..\packages\Microsoft.AspNetCore.Server.WebListener.1.1.2\lib\net451\Microsoft.AspNetCore.Server.WebListener.dll - - ..\..\packages\Microsoft.AspNetCore.WebUtilities.1.1.0\lib\net451\Microsoft.AspNetCore.WebUtilities.dll - True + + ..\..\packages\Microsoft.AspNetCore.WebUtilities.1.1.2\lib\net451\Microsoft.AspNetCore.WebUtilities.dll - - ..\..\packages\Microsoft.Extensions.Configuration.1.1.0\lib\netstandard1.1\Microsoft.Extensions.Configuration.dll - True + + ..\..\packages\Microsoft.Extensions.Configuration.1.1.2\lib\netstandard1.1\Microsoft.Extensions.Configuration.dll - - ..\..\packages\Microsoft.Extensions.Configuration.Abstractions.1.1.0\lib\netstandard1.0\Microsoft.Extensions.Configuration.Abstractions.dll - True + + ..\..\packages\Microsoft.Extensions.Configuration.Abstractions.1.1.2\lib\netstandard1.0\Microsoft.Extensions.Configuration.Abstractions.dll - - ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.1.1.0\lib\net451\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - True + + ..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.1.1.2\lib\net451\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - - ..\..\packages\Microsoft.Extensions.DependencyInjection.1.1.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll - True + + ..\..\packages\Microsoft.Extensions.DependencyInjection.1.1.1\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True + + ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.1\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.1.1.0\lib\netstandard1.0\Microsoft.Extensions.FileProviders.Abstractions.dll - True + + ..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.1.1.1\lib\netstandard1.0\Microsoft.Extensions.FileProviders.Abstractions.dll - - ..\..\packages\Microsoft.Extensions.FileProviders.Physical.1.1.0\lib\net451\Microsoft.Extensions.FileProviders.Physical.dll - True + + ..\..\packages\Microsoft.Extensions.FileProviders.Physical.1.1.1\lib\net451\Microsoft.Extensions.FileProviders.Physical.dll - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing.1.1.0\lib\net45\Microsoft.Extensions.FileSystemGlobbing.dll - True + + ..\..\packages\Microsoft.Extensions.FileSystemGlobbing.1.1.1\lib\net45\Microsoft.Extensions.FileSystemGlobbing.dll - - ..\..\packages\Microsoft.Extensions.Logging.1.1.0\lib\netstandard1.1\Microsoft.Extensions.Logging.dll - True + + ..\..\packages\Microsoft.Extensions.Logging.1.1.2\lib\netstandard1.1\Microsoft.Extensions.Logging.dll - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.1.0\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll - True + + ..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.1.2\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll - - ..\..\packages\Microsoft.Extensions.ObjectPool.1.1.0\lib\net451\Microsoft.Extensions.ObjectPool.dll - True + + ..\..\packages\Microsoft.Extensions.ObjectPool.1.1.1\lib\net451\Microsoft.Extensions.ObjectPool.dll - - ..\..\packages\Microsoft.Extensions.Options.1.1.0\lib\netstandard1.0\Microsoft.Extensions.Options.dll - True + + ..\..\packages\Microsoft.Extensions.Options.1.1.2\lib\netstandard1.0\Microsoft.Extensions.Options.dll ..\..\packages\Microsoft.Extensions.PlatformAbstractions.1.1.0\lib\net451\Microsoft.Extensions.PlatformAbstractions.dll True - - ..\..\packages\Microsoft.Extensions.Primitives.1.1.0\lib\netstandard1.0\Microsoft.Extensions.Primitives.dll - True + + ..\..\packages\Microsoft.Extensions.Primitives.1.1.1\lib\netstandard1.0\Microsoft.Extensions.Primitives.dll - - ..\..\packages\Microsoft.Net.Http.Headers.1.1.0\lib\netstandard1.1\Microsoft.Net.Http.Headers.dll - True + + ..\..\packages\Microsoft.Net.Http.Headers.1.1.2\lib\netstandard1.1\Microsoft.Net.Http.Headers.dll - - ..\..\packages\Microsoft.Net.Http.Server.1.1.0\lib\net451\Microsoft.Net.Http.Server.dll - True + + ..\..\packages\Microsoft.Net.Http.Server.1.1.2\lib\net451\Microsoft.Net.Http.Server.dll ..\..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll @@ -167,9 +142,8 @@ True - - ..\..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - True + + ..\..\packages\System.Diagnostics.DiagnosticSource.4.3.1\lib\net46\System.Diagnostics.DiagnosticSource.dll ..\..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll @@ -238,9 +212,8 @@ ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll True - - ..\..\packages\System.Text.Encodings.Web.4.3.0\lib\netstandard1.0\System.Text.Encodings.Web.dll - True + + ..\..\packages\System.Text.Encodings.Web.4.3.1\lib\netstandard1.0\System.Text.Encodings.Web.dll ..\..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll @@ -293,12 +266,12 @@ - + - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。 - + + \ No newline at end of file diff --git a/src/MagicOnion.HttpGateway/MagicOnionHttpGatewayMiddleware.cs b/src/MagicOnion.HttpGateway/MagicOnionHttpGatewayMiddleware.cs index 22be02ce1..da9a14fb9 100644 --- a/src/MagicOnion.HttpGateway/MagicOnionHttpGatewayMiddleware.cs +++ b/src/MagicOnion.HttpGateway/MagicOnionHttpGatewayMiddleware.cs @@ -1,4 +1,5 @@ using Grpc.Core; +using System.Reflection; using MagicOnion.Server; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; @@ -56,7 +57,7 @@ public async Task Invoke(HttpContext httpContext) { args.Add((string)stringValues); } - else if (p.ParameterType.IsEnum) + else if (p.ParameterType.GetTypeInfo().IsEnum) { args.Add(Enum.Parse(p.ParameterType, (string)stringValues)); } @@ -80,7 +81,7 @@ public async Task Invoke(HttpContext httpContext) { serializeTarget = "[" + string.Join(", ", stringValues.Select(x => JsonConvert.SerializeObject(x))) + "]"; // escape serialzie } - else if (collectionType.IsEnum || collectionType == typeof(DateTime) || collectionType == typeof(DateTimeOffset) || collectionType == typeof(DateTime?) || collectionType == typeof(DateTimeOffset?)) + else if (collectionType.GetTypeInfo().IsEnum || collectionType == typeof(DateTime) || collectionType == typeof(DateTimeOffset) || collectionType == typeof(DateTime?) || collectionType == typeof(DateTimeOffset?)) { serializeTarget = "[" + string.Join(", ", stringValues.Select(x => "\"" + x + "\"")) + "]"; } @@ -155,7 +156,7 @@ Type GetCollectionType(Type type) { if (type.IsArray) return type.GetElementType(); - if (type.IsGenericType) + if (type.GetTypeInfo().IsGenericType) { var genTypeDef = type.GetGenericTypeDefinition(); if (genTypeDef == typeof(IEnumerable<>) diff --git a/src/MagicOnion.HttpGateway/Properties/AssemblyInfo.cs b/src/MagicOnion.HttpGateway/Properties/AssemblyInfo.cs deleted file mode 100644 index 61d58146a..000000000 --- a/src/MagicOnion.HttpGateway/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MagicOnion.HttpGateway")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MagicOnion.HttpGateway")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("fce03661-803e-4629-944f-45db6b444320")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.3.0")] -[assembly: AssemblyFileVersion("0.3.3.0")] diff --git a/src/MagicOnion.HttpGateway/Swagger/SwaggerDefinitionBuilder.cs b/src/MagicOnion.HttpGateway/Swagger/SwaggerDefinitionBuilder.cs index 2979c74f1..c0cc1271d 100644 --- a/src/MagicOnion.HttpGateway/Swagger/SwaggerDefinitionBuilder.cs +++ b/src/MagicOnion.HttpGateway/Swagger/SwaggerDefinitionBuilder.cs @@ -141,9 +141,9 @@ Parameter[] BuildParameters(IDictionary definitions, XmlCommentS string defaultObjectExample = null; object[] enums = null; - if (x.ParameterType.IsEnum || (collectionType != null && collectionType.IsEnum)) + if (x.ParameterType.GetTypeInfo().IsEnum || (collectionType != null && collectionType.GetTypeInfo().IsEnum)) { - var enumType = (x.ParameterType.IsEnum) ? x.ParameterType : collectionType; + var enumType = (x.ParameterType.GetTypeInfo().IsEnum) ? x.ParameterType : collectionType; var enumValues = Enum.GetNames(enumType); @@ -167,7 +167,12 @@ Parameter[] BuildParameters(IDictionary definitions, XmlCommentS refSchema = new Schema { @ref = BuildSchema(definitions, x.ParameterType) }; if (parameterInfos.Length != 1) { +#if NET_FRAMEWORK var unknownObj = System.Runtime.Serialization.FormatterServices.GetUninitializedObject(x.ParameterType); +#else + var unknownObj = Activator.CreateInstance(x.ParameterType); +#endif + defaultObjectExample = JsonConvert.SerializeObject(unknownObj, new[] { new Newtonsoft.Json.Converters.StringEnumConverter() }); } } @@ -236,7 +241,7 @@ string BuildSchema(IDictionary definitions, Type type) } else { - if (collectionType.IsEnum) + if (collectionType.GetTypeInfo().IsEnum) { items = new Schema { @@ -252,7 +257,7 @@ string BuildSchema(IDictionary definitions, Type type) } IList schemaEnum = null; - if (memberType.IsEnum) + if (memberType.GetTypeInfo().IsEnum) { schemaEnum = Enum.GetNames(memberType); } @@ -295,7 +300,7 @@ static Type GetCollectionType(Type type) { if (type.IsArray) return type.GetElementType(); - if (type.IsGenericType) + if (type.GetTypeInfo().IsGenericType) { var genTypeDef = type.GetGenericTypeDefinition(); if (genTypeDef == typeof(IEnumerable<>) @@ -375,7 +380,7 @@ static string ToSwaggerDataType(Type type) type = Nullable.GetUnderlyingType(type); } - if (type.IsEnum || type == typeof(DateTime) || type == typeof(DateTimeOffset)) + if (type.GetTypeInfo().IsEnum || type == typeof(DateTime) || type == typeof(DateTimeOffset)) { return "string"; } @@ -408,7 +413,7 @@ static string ToSwaggerDataType(Type type) static string UnwrapTypeName(Type t) { if (t == typeof(void)) return "void"; - if (!t.IsGenericType) return t.Name; + if (!t.GetTypeInfo().IsGenericType) return t.Name; var innerFormat = string.Join(", ", t.GetGenericArguments().Select(x => UnwrapTypeName(x))); return Regex.Replace(t.GetGenericTypeDefinition().Name, @"`.+$", "") + "<" + innerFormat + ">"; diff --git a/src/MagicOnion/MagicOnion.csproj b/src/MagicOnion/MagicOnion.csproj index de9b4a59d..b93772bed 100644 --- a/src/MagicOnion/MagicOnion.csproj +++ b/src/MagicOnion/MagicOnion.csproj @@ -2,6 +2,7 @@ netstandard1.5;net46;net47; + False @@ -14,6 +15,7 @@ True 1701;1702;1705;1591 RELEASE;NET_FRAMEWORK;net46;NON_UNITY; + bin\Release\net46\MagicOnion.xml @@ -26,6 +28,7 @@ True 1701;1702;1705;1591 RELEASE;NET_FRAMEWORK;NET47;NON_UNITY; + bin\Release\net47\MagicOnion.xml @@ -38,10 +41,9 @@ True 1701;1702;1705;1591 RELEASE;NETSTANDARD1_5;NON_UNITY; + bin\Release\netstandard1.5\MagicOnion.xml - - diff --git a/src/MagicOnion/Server/MagicOnionEngine.cs b/src/MagicOnion/Server/MagicOnionEngine.cs index 829e7092b..0c5c2c296 100644 --- a/src/MagicOnion/Server/MagicOnionEngine.cs +++ b/src/MagicOnion/Server/MagicOnionEngine.cs @@ -32,6 +32,9 @@ public static MagicOnionServiceDefinition BuildServerServiceDefinition(MagicOnio #else + /// + /// Search MagicOnion service from entry assembly. + /// public static MagicOnionServiceDefinition BuildServerServiceDefinition(MagicOnionOptions options) { return BuildServerServiceDefinition(new[] { Assembly.GetEntryAssembly() }, options); diff --git a/src/MagicOnion/packages.config b/src/MagicOnion/packages.config deleted file mode 100644 index 1ec9126a5..000000000 --- a/src/MagicOnion/packages.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file