Skip to content

Commit

Permalink
Make svcutil generate public static methods instead of private
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Jun 22, 2023
1 parent 5b5a784 commit 81520e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
};

Expand All @@ -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)),
};

Expand Down Expand Up @@ -412,7 +412,7 @@ private static void AddWS2007HttpBindingConfiguration(CodeStatementCollection st
ResultVarName,
new CodeObjectCreateExpression(typeof(WS2007HttpBinding))));
resultVar = new CodeVariableReferenceExpression(ResultVarName);
}
}

WSHttpMaxOutProperties(statements, resultVar);

Expand Down Expand Up @@ -960,7 +960,7 @@ private static void AddCustomBindingConfiguration(CodeStatementCollection statem
ResultVarName,
new CodeObjectCreateExpression(typeof(CustomBinding))));
resultVar = new CodeVariableReferenceExpression(ResultVarName);
}
}

foreach (BindingElement bindingElement in custom.Elements)
{
Expand Down Expand Up @@ -1998,14 +1998,14 @@ private void CreateDefaultEndpointMethods(string clientTypeName, List<string> 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)),
};
Expand Down

0 comments on commit 81520e8

Please sign in to comment.