-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceAClient.cs
More file actions
25 lines (21 loc) · 770 Bytes
/
Copy pathServiceAClient.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 = "IServiceA")]
public interface IServiceA
{
[OperationContract(Action = "http://tempuri.org/IServiceA/Foo", ReplyAction = "http://tempuri.org/IServiceA/FooResponse")]
string Foo();
[OperationContract(Action = "http://tempuri.org/IServiceA/Foo", ReplyAction = "http://tempuri.org/IServiceA/FooResponse")]
Task<string> FooAsync();
}
public partial class ServiceAClient : ClientBase<IServiceA>, IServiceA
{
public ServiceAClient()
: base(new WSHttpBinding(), new EndpointAddress(Addresses.ServiceAUri))
{ }
public string Foo() => Channel.Foo();
public Task<string> FooAsync() => Channel.FooAsync();
}
}