Skip to content

Commit 81520e8

Browse files
committed
Make svcutil generate public static methods instead of private
Fixes dotnet#5179
1 parent 5b5a784 commit 81520e8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/dotnet-svcutil/lib/src/CodeDomFixup/MethodCreationHelper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public MethodCreationHelper(CodeTypeDeclaration clientType)
2525
this.GetEndpointAddress = new CodeMemberMethod
2626
{
2727
Name = ConfigToCodeConstants.GetEndpointAddressMethod,
28-
Attributes = MemberAttributes.Private | MemberAttributes.Static,
28+
Attributes = MemberAttributes.Public | MemberAttributes.Static,
2929
ReturnType = new CodeTypeReference(typeof(EndpointAddress)),
3030
};
3131

@@ -34,7 +34,7 @@ public MethodCreationHelper(CodeTypeDeclaration clientType)
3434
this.GetBinding = new CodeMemberMethod
3535
{
3636
Name = ConfigToCodeConstants.GetBindingMethod,
37-
Attributes = MemberAttributes.Private | MemberAttributes.Static,
37+
Attributes = MemberAttributes.Public | MemberAttributes.Static,
3838
ReturnType = new CodeTypeReference(typeof(Binding)),
3939
};
4040

@@ -412,7 +412,7 @@ private static void AddWS2007HttpBindingConfiguration(CodeStatementCollection st
412412
ResultVarName,
413413
new CodeObjectCreateExpression(typeof(WS2007HttpBinding))));
414414
resultVar = new CodeVariableReferenceExpression(ResultVarName);
415-
}
415+
}
416416

417417
WSHttpMaxOutProperties(statements, resultVar);
418418

@@ -960,7 +960,7 @@ private static void AddCustomBindingConfiguration(CodeStatementCollection statem
960960
ResultVarName,
961961
new CodeObjectCreateExpression(typeof(CustomBinding))));
962962
resultVar = new CodeVariableReferenceExpression(ResultVarName);
963-
}
963+
}
964964

965965
foreach (BindingElement bindingElement in custom.Elements)
966966
{
@@ -1998,14 +1998,14 @@ private void CreateDefaultEndpointMethods(string clientTypeName, List<string> en
19981998

19991999
this.GetDefaultBinding = new CodeMemberMethod
20002000
{
2001-
Attributes = MemberAttributes.Static | MemberAttributes.Private,
2001+
Attributes = MemberAttributes.Static | MemberAttributes.Public,
20022002
Name = ConfigToCodeConstants.GetDefaultBindingMethod,
20032003
ReturnType = new CodeTypeReference(typeof(Binding)),
20042004
};
20052005

20062006
this.GetDefaultEndpointAddress = new CodeMemberMethod
20072007
{
2008-
Attributes = MemberAttributes.Static | MemberAttributes.Private,
2008+
Attributes = MemberAttributes.Static | MemberAttributes.Public,
20092009
Name = ConfigToCodeConstants.GetDefaultEndpointAddressMethod,
20102010
ReturnType = new CodeTypeReference(typeof(EndpointAddress)),
20112011
};

0 commit comments

Comments
 (0)