-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathReference.cs
More file actions
178 lines (144 loc) · 9.19 KB
/
Reference.cs
File metadata and controls
178 lines (144 loc) · 9.19 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CoreWcf.Samples.GettingStarted
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://CoreWcf.Samples.GettingStarted", ConfigurationName="CoreWcf.Samples.GettingStarted.ICalculatorService")]
public interface ICalculatorService
{
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Add", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/AddResponse")]
double Add(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Add", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/AddResponse")]
System.Threading.Tasks.Task<double> AddAsync(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Subtract", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/SubtractResponse")]
double Subtract(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Subtract", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/SubtractResponse")]
System.Threading.Tasks.Task<double> SubtractAsync(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Multiply", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/MultiplyResponse")]
double Multiply(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Multiply", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/MultiplyResponse")]
System.Threading.Tasks.Task<double> MultiplyAsync(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Divide", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/DivideResponse")]
double Divide(double n1, double n2);
[System.ServiceModel.OperationContractAttribute(Action="http://CoreWcf.Samples.GettingStarted/ICalculatorService/Divide", ReplyAction="http://CoreWcf.Samples.GettingStarted/ICalculatorService/DivideResponse")]
System.Threading.Tasks.Task<double> DivideAsync(double n1, double n2);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public interface ICalculatorServiceChannel : CoreWcf.Samples.GettingStarted.ICalculatorService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public partial class CalculatorServiceClient : System.ServiceModel.ClientBase<CoreWcf.Samples.GettingStarted.ICalculatorService>, CoreWcf.Samples.GettingStarted.ICalculatorService
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
public CalculatorServiceClient() :
base(CalculatorServiceClient.GetDefaultBinding(), CalculatorServiceClient.GetDefaultEndpointAddress())
{
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_ICalculatorService.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public CalculatorServiceClient(EndpointConfiguration endpointConfiguration) :
base(CalculatorServiceClient.GetBindingForEndpoint(endpointConfiguration), CalculatorServiceClient.GetEndpointAddress(endpointConfiguration))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public CalculatorServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
base(CalculatorServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public CalculatorServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
base(CalculatorServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public CalculatorServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public double Add(double n1, double n2)
{
return base.Channel.Add(n1, n2);
}
public System.Threading.Tasks.Task<double> AddAsync(double n1, double n2)
{
return base.Channel.AddAsync(n1, n2);
}
public double Subtract(double n1, double n2)
{
return base.Channel.Subtract(n1, n2);
}
public System.Threading.Tasks.Task<double> SubtractAsync(double n1, double n2)
{
return base.Channel.SubtractAsync(n1, n2);
}
public double Multiply(double n1, double n2)
{
return base.Channel.Multiply(n1, n2);
}
public System.Threading.Tasks.Task<double> MultiplyAsync(double n1, double n2)
{
return base.Channel.MultiplyAsync(n1, n2);
}
public double Divide(double n1, double n2)
{
return base.Channel.Divide(n1, n2);
}
public System.Threading.Tasks.Task<double> DivideAsync(double n1, double n2)
{
return base.Channel.DivideAsync(n1, n2);
}
public virtual System.Threading.Tasks.Task OpenAsync()
{
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
}
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ICalculatorService))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ICalculatorService))
{
return new System.ServiceModel.EndpointAddress("http://localhost:5000/CalculatorService");
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
{
return CalculatorServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_ICalculatorService);
}
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
{
return CalculatorServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_ICalculatorService);
}
public enum EndpointConfiguration
{
BasicHttpBinding_ICalculatorService,
}
}
}