diff --git a/Directory.Build.props b/Directory.Build.props index 0a510a0..9fa7981 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,54 +1,54 @@ - - net8.0 - ProtoBuf.Grpc - Marc Gravell - Library - true - False - NU5105;CS1701;BC42016;MSB3884;NETSDK1057;CS8632;IDE0090;IDE0057;xUnit1004 - $(MSBuildThisFileDirectory)ProtoBuf.snk - Marc Gravell, 2019- - Apache-2.0 - https://github.com/protobuf-net/protobuf-net.Grpc - https://github.com/protobuf-net/protobuf-net.Grpc - git - protobuf-net.Grpc ($(TargetFramework)) - https://protobuf-net.github.io/protobuf-net.Grpc/releasenotes#$(VersionPrefix) + + net8.0 + ProtoBuf.Grpc + Marc Gravell + Library + true + False + NU5105;CS1701;BC42016;MSB3884;NETSDK1057;CS8632;IDE0090;IDE0057;xUnit1004 + $(MSBuildThisFileDirectory)ProtoBuf.snk + Marc Gravell, 2019- + Apache-2.0 + https://github.com/protobuf-net/protobuf-net.Grpc + https://github.com/protobuf-net/protobuf-net.Grpc + git + protobuf-net.Grpc ($(TargetFramework)) + https://protobuf-net.github.io/protobuf-net.Grpc/releasenotes#$(VersionPrefix) - true - grpc - true - embedded - en-US - false - $(MSBuildProjectName.Contains('Test')) - enable - latest - + true + grpc + true + embedded + en-US + false + $(MSBuildProjectName.Contains('Test')) + enable + latest + - local - + local + - 2.4.8 - - - true - true - + 2.4.8 + + + true + true + - - true - true - true - - - - + + true + true + true + + + + - - - - - + + + + + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index 6d77660..b3ad992 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,36 +1,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/protobuf-net.Grpc.AspNetCore/protobuf-net.Grpc.AspNetCore.csproj b/src/protobuf-net.Grpc.AspNetCore/protobuf-net.Grpc.AspNetCore.csproj index 86ba1b4..5e3198f 100644 --- a/src/protobuf-net.Grpc.AspNetCore/protobuf-net.Grpc.AspNetCore.csproj +++ b/src/protobuf-net.Grpc.AspNetCore/protobuf-net.Grpc.AspNetCore.csproj @@ -1,12 +1,23 @@  - - net6.0;net8.0 - ProtoBuf.Grpc.Server - - - - - - + + net8.0 + ProtoBuf.Grpc.Server + git + https://github.com/protobuf-net/protobuf-net.Grpc + + + Hexesoft.ProtoBuf.Grpc.Server + true + https://github.com/hexesoft/protobuf-net.Grpc + true + $([System.DateTime]::Now.ToString('yyyy.M.d'))-dev + $(BUILD_BUILDNUMBER) + + + + + + + diff --git a/src/protobuf-net.Grpc.ClientFactory/protobuf-net.Grpc.ClientFactory.csproj b/src/protobuf-net.Grpc.ClientFactory/protobuf-net.Grpc.ClientFactory.csproj index 5567a7b..723b3c7 100644 --- a/src/protobuf-net.Grpc.ClientFactory/protobuf-net.Grpc.ClientFactory.csproj +++ b/src/protobuf-net.Grpc.ClientFactory/protobuf-net.Grpc.ClientFactory.csproj @@ -1,13 +1,23 @@ - - netstandard2.0;netstandard2.1;net8.0 - ProtoBuf.Grpc.ClientFactory - + + net8.0 + ProtoBuf.Grpc.ClientFactory + git + https://github.com/protobuf-net/protobuf-net.Grpc + + + Hexesoft.ProtoBuf.Grpc.ClientFactory + true + https://github.com/hexesoft/protobuf-net.Grpc + true + $([System.DateTime]::Now.ToString('yyyy.M.d'))-dev + $(BUILD_BUILDNUMBER) + - - - - + + + + diff --git a/src/protobuf-net.Grpc/Configuration/ServerBinder.cs b/src/protobuf-net.Grpc/Configuration/ServerBinder.cs index 22edf7e..b8b104d 100644 --- a/src/protobuf-net.Grpc/Configuration/ServerBinder.cs +++ b/src/protobuf-net.Grpc/Configuration/ServerBinder.cs @@ -40,7 +40,7 @@ public int Bind(object state, Type serviceType, BinderConfiguration? binderConfi Type[] typesBuffer = []; binderConfiguration ??= BinderConfiguration.Default; var potentialServiceContracts = typeof(IGrpcService).IsAssignableFrom(serviceType) - ? new HashSet {serviceType} + ? new HashSet { serviceType } : ContractOperation.ExpandInterfaces(serviceType); bool serviceImplSimplifiedExceptions = serviceType.IsDefined(typeof(SimpleRpcExceptionsAttribute)); @@ -50,7 +50,7 @@ public int Bind(object state, Type serviceType, BinderConfiguration? binderConfi // now that we know it is a service contract type for sure var serviceContract = potentialServiceContract; - + var typesToBeIncludedInMethodsBinding = ContractOperation.ExpandWithInterfacesMarkedAsSubService(binderConfiguration.Binder, serviceContract); @@ -64,7 +64,7 @@ public int Bind(object state, Type serviceType, BinderConfiguration? binderConfi var serviceContractSimplifiedExceptions = serviceImplSimplifiedExceptions || typeToBindItsMethods.IsDefined( typeof(SimpleRpcExceptionsAttribute)); - var bindCtx = new ServiceBindContext(serviceContract, serviceType, state, binderConfiguration.Binder); + var bindCtx = new ServiceBindContext(typeToBindItsMethods, serviceType, state, binderConfiguration.Binder); foreach (var op in ContractOperation.FindOperations(binderConfiguration, typeToBindItsMethods, this)) { if (ServerInvokerLookup.TryGetValue(op.MethodType, op.Context, op.Arg, op.Result, op.Void, out var invoker) @@ -114,7 +114,7 @@ bool AddMethod(string? serviceName, Type @in, Type @out, string on, MethodInfo m // 6, 7 set during array initialization argsBuffer[8] = simplifiedExceptionHandling; - return (bool) s_addMethod.MakeGenericMethod(typesBuffer).Invoke(this, argsBuffer)!; + return (bool)s_addMethod.MakeGenericMethod(typesBuffer).Invoke(this, argsBuffer)!; } catch (Exception fail) { @@ -180,7 +180,7 @@ public TDelegate CreateDelegate() else { // basic - direct call - return (TDelegate) Delegate.CreateDelegate(typeof(TDelegate), _service, Method); + return (TDelegate)Delegate.CreateDelegate(typeof(TDelegate), _service, Method); } } else @@ -234,8 +234,8 @@ static Expression ApplySimpleExceptionHandling(Expression body) #pragma warning disable CS0618 private static readonly Dictionary s_ReshapeWithSimpleExceptionHandling = (from method in typeof(Reshape).GetMethods(BindingFlags.Public | BindingFlags.Static) - where method.Name is nameof(Reshape.WithSimpleExceptionHandling) - select method) + where method.Name is nameof(Reshape.WithSimpleExceptionHandling) + select method) .ToDictionary(method => method.IsGenericMethodDefinition ? method.GetGenericArguments().Length : 0); #pragma warning restore CS0618 diff --git a/src/protobuf-net.Grpc/protobuf-net.Grpc.csproj b/src/protobuf-net.Grpc/protobuf-net.Grpc.csproj index 1f128e2..a3fd37f 100644 --- a/src/protobuf-net.Grpc/protobuf-net.Grpc.csproj +++ b/src/protobuf-net.Grpc/protobuf-net.Grpc.csproj @@ -1,24 +1,25 @@  - - net462;netstandard2.1;netstandard2.0;net6.0;net8.0 - ProtoBuf.Grpc - $(DefineConstants);PLAT_NO_CHANNEL_READALLASYNC - - - - - - - - - - - - - - - - - - + + + net8.0 + $(DefineConstants);PLAT_NO_CHANNEL_READALLASYNC + ProtoBuf.Grpc + git + https://github.com/protobuf-net/protobuf-net.Grpc + + + Hexesoft.ProtoBuf.Grpc + https://github.com/hexesoft/protobuf-net.Grpc + true + true + $([System.DateTime]::Now.ToString('yyyy.M.d'))-dev + $(BUILD_BUILDNUMBER) + + + + + + + + \ No newline at end of file