From 6b4d61c77eb80edfbdea827d027f72ff0222331f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Thu, 22 Jun 2023 16:31:15 +0200 Subject: [PATCH] Make svcutil generate public static methods instead of private Fixes #5179 --- .../lib/src/CodeDomFixup/MethodCreationHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs b/src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs index cdb8bc8c7a..0a85ff058a 100644 --- a/src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs +++ b/src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs @@ -25,7 +25,7 @@ public MethodCreationHelper(CodeTypeDeclaration clientType) this.GetEndpointAddress = new CodeMemberMethod { Name = ConfigToCodeConstants.GetEndpointAddressMethod, - Attributes = MemberAttributes.Private | MemberAttributes.Static, + Attributes = MemberAttributes.Public | MemberAttributes.Static, ReturnType = new CodeTypeReference(typeof(EndpointAddress)), }; @@ -34,7 +34,7 @@ public MethodCreationHelper(CodeTypeDeclaration clientType) this.GetBinding = new CodeMemberMethod { Name = ConfigToCodeConstants.GetBindingMethod, - Attributes = MemberAttributes.Private | MemberAttributes.Static, + Attributes = MemberAttributes.Public | MemberAttributes.Static, ReturnType = new CodeTypeReference(typeof(Binding)), }; @@ -1998,14 +1998,14 @@ private void CreateDefaultEndpointMethods(string clientTypeName, List en this.GetDefaultBinding = new CodeMemberMethod { - Attributes = MemberAttributes.Static | MemberAttributes.Private, + Attributes = MemberAttributes.Static | MemberAttributes.Public, Name = ConfigToCodeConstants.GetDefaultBindingMethod, ReturnType = new CodeTypeReference(typeof(Binding)), }; this.GetDefaultEndpointAddress = new CodeMemberMethod { - Attributes = MemberAttributes.Static | MemberAttributes.Private, + Attributes = MemberAttributes.Static | MemberAttributes.Public, Name = ConfigToCodeConstants.GetDefaultEndpointAddressMethod, ReturnType = new CodeTypeReference(typeof(EndpointAddress)), };