-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceBClient.cs
More file actions
25 lines (21 loc) · 770 Bytes
/
Copy pathServiceBClient.cs
File metadata and controls
25 lines (21 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.ServiceModel;
using System.Threading.Tasks;
namespace DotNet462WcfAsyncFlowBug.Client
{
[ServiceContract(ConfigurationName = "IServiceB")]
public interface IServiceB
{
[OperationContract(Action = "http://tempuri.org/IServiceB/Bar", ReplyAction = "http://tempuri.org/IServiceB/BarResponse")]
string Bar();
[OperationContract(Action = "http://tempuri.org/IServiceB/Bar", ReplyAction = "http://tempuri.org/IServiceB/BarResponse")]
Task<string> BarAsync();
}
public partial class ServiceBClient : ClientBase<IServiceB>, IServiceB
{
public ServiceBClient()
: base(new WSHttpBinding(), new EndpointAddress(Addresses.ServiceBUri))
{ }
public string Bar() => Channel.Bar();
public Task<string> BarAsync() => Channel.BarAsync();
}
}