//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace RankingServiceReference { [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] [System.ServiceModel.ServiceContractAttribute(Namespace="http://ranking/", ConfigurationName="RankingServiceReference.RankingService")] public interface RankingService { // CODEGEN: Parameter 'return' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'Microsoft.Xml.Serialization.XmlArrayAttribute'. [System.ServiceModel.OperationContractAttribute(Action="http://ranking/RankingService/rankingListRequest", ReplyAction="http://ranking/RankingService/rankingListResponse")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] [return: System.ServiceModel.MessageParameterAttribute(Name="return")] RankingServiceReference.rankingListResponse rankingList(RankingServiceReference.rankingListRequest request); [System.ServiceModel.OperationContractAttribute(Action="http://ranking/RankingService/rankingListRequest", ReplyAction="http://ranking/RankingService/rankingListResponse")] System.Threading.Tasks.Task rankingListAsync(RankingServiceReference.rankingListRequest request); } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://ranking/")] public partial class competitor { private string nameField; private string timeField; /// [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] public string name { get { return this.nameField; } set { this.nameField = value; } } /// [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] public string time { get { return this.timeField; } set { this.timeField = value; } } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="rankingList", WrapperNamespace="http://ranking/", IsWrapped=true)] public partial class rankingListRequest { public rankingListRequest() { } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="rankingListResponse", WrapperNamespace="http://ranking/", IsWrapped=true)] public partial class rankingListResponse { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=0)] [System.Xml.Serialization.XmlArrayAttribute()] [System.Xml.Serialization.XmlArrayItemAttribute("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public RankingServiceReference.competitor[] @return; public rankingListResponse() { } public rankingListResponse(RankingServiceReference.competitor[] @return) { this.@return = @return; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] public interface RankingServiceChannel : RankingServiceReference.RankingService, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")] public partial class RankingServiceClient : System.ServiceModel.ClientBase, RankingServiceReference.RankingService { /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); public RankingServiceClient() : base(RankingServiceClient.GetDefaultBinding(), RankingServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.RankingServicePort.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public RankingServiceClient(EndpointConfiguration endpointConfiguration) : base(RankingServiceClient.GetBindingForEndpoint(endpointConfiguration), RankingServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public RankingServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(RankingServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public RankingServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(RankingServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public RankingServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] RankingServiceReference.rankingListResponse RankingServiceReference.RankingService.rankingList(RankingServiceReference.rankingListRequest request) { return base.Channel.rankingList(request); } public RankingServiceReference.competitor[] rankingList() { RankingServiceReference.rankingListRequest inValue = new RankingServiceReference.rankingListRequest(); RankingServiceReference.rankingListResponse retVal = ((RankingServiceReference.RankingService)(this)).rankingList(inValue); return retVal.@return; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task RankingServiceReference.RankingService.rankingListAsync(RankingServiceReference.rankingListRequest request) { return base.Channel.rankingListAsync(request); } public System.Threading.Tasks.Task rankingListAsync() { RankingServiceReference.rankingListRequest inValue = new RankingServiceReference.rankingListRequest(); return ((RankingServiceReference.RankingService)(this)).rankingListAsync(inValue); } 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.ServiceModel.ICommunicationObject)(this)).EndOpen)); } private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.RankingServicePort)) { 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.RankingServicePort)) { return new System.ServiceModel.EndpointAddress("http://localhost:8081/ranking/RankingService"); } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return RankingServiceClient.GetBindingForEndpoint(EndpointConfiguration.RankingServicePort); } private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return RankingServiceClient.GetEndpointAddress(EndpointConfiguration.RankingServicePort); } public enum EndpointConfiguration { RankingServicePort, } } }