//------------------------------------------------------------------------------ // // 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 BranchServices { using System.Runtime.Serialization; [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] [System.Runtime.Serialization.DataContractAttribute(Name="branch", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")] public partial class branch : object { private string addressField; private string brCodeField; private string brDescField; private string contactInfoField; private System.DateTime creationDateField; private System.DateTime editDateField; [System.Runtime.Serialization.DataMemberAttribute()] public string address { get { return this.addressField; } set { this.addressField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public string brCode { get { return this.brCodeField; } set { this.brCodeField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public string brDesc { get { return this.brDescField; } set { this.brDescField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public string contactInfo { get { return this.contactInfoField; } set { this.contactInfoField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public System.DateTime creationDate { get { return this.creationDateField; } set { this.creationDateField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public System.DateTime editDate { get { return this.editDateField; } set { this.editDateField = value; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] [System.ServiceModel.ServiceContractAttribute(ConfigurationName="BranchServices.IBranchService")] public interface IBranchService { [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/TestCall", ReplyAction="http://tempuri.org/IBranchService/TestCallResponse")] System.Threading.Tasks.Task TestCallAsync(BranchServices.branch b); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/GetData", ReplyAction="http://tempuri.org/IBranchService/GetDataResponse")] System.Threading.Tasks.Task GetDataAsync(); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateBranchInfo", ReplyAction="http://tempuri.org/IBranchService/UpdateBranchInfoResponse")] System.Threading.Tasks.Task UpdateBranchInfoAsync(BranchServices.branch Branch); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/AddBranch", ReplyAction="http://tempuri.org/IBranchService/AddBranchResponse")] System.Threading.Tasks.Task AddBranchAsync(BranchServices.branch Branch); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/DeleteByBranchCode", ReplyAction="http://tempuri.org/IBranchService/DeleteByBranchCodeResponse")] System.Threading.Tasks.Task DeleteByBranchCodeAsync(string branchCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateRemoteData", ReplyAction="http://tempuri.org/IBranchService/UpdateRemoteDataResponse")] System.Threading.Tasks.Task UpdateRemoteDataAsync(); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateRemoteBranchData", ReplyAction="http://tempuri.org/IBranchService/UpdateRemoteBranchDataResponse")] System.Threading.Tasks.Task UpdateRemoteBranchDataAsync(BranchServices.branch Branch); } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] public interface IBranchServiceChannel : BranchServices.IBranchService, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] public partial class BranchServiceClient : System.ServiceModel.ClientBase, BranchServices.IBranchService { /// /// 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 BranchServiceClient() : base(BranchServiceClient.GetDefaultBinding(), BranchServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IBranchService.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public BranchServiceClient(EndpointConfiguration endpointConfiguration) : base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), BranchServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public BranchServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public BranchServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public BranchServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } public System.Threading.Tasks.Task TestCallAsync(BranchServices.branch b) { return base.Channel.TestCallAsync(b); } public System.Threading.Tasks.Task GetDataAsync() { return base.Channel.GetDataAsync(); } public System.Threading.Tasks.Task UpdateBranchInfoAsync(BranchServices.branch Branch) { return base.Channel.UpdateBranchInfoAsync(Branch); } public System.Threading.Tasks.Task AddBranchAsync(BranchServices.branch Branch) { return base.Channel.AddBranchAsync(Branch); } public System.Threading.Tasks.Task DeleteByBranchCodeAsync(string branchCode) { return base.Channel.DeleteByBranchCodeAsync(branchCode); } public System.Threading.Tasks.Task UpdateRemoteDataAsync() { return base.Channel.UpdateRemoteDataAsync(); } public System.Threading.Tasks.Task UpdateRemoteBranchDataAsync(BranchServices.branch Branch) { return base.Channel.UpdateRemoteBranchDataAsync(Branch); } 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.BasicHttpBinding_IBranchService)) { 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_IBranchService)) { return new System.ServiceModel.EndpointAddress("http://kwapp-srv/CommServices/BranchService.svc"); } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return BranchServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IBranchService); } private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return BranchServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IBranchService); } public enum EndpointConfiguration { BasicHttpBinding_IBranchService, } } }