﻿//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace ServiceClient.PartsService {
    using System.Runtime.Serialization;
    using System;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="PartInfo", Namespace="http://schemas.datacontract.org/2004/07/WCF")]
    [System.SerializableAttribute()]
    public partial class PartInfo : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string NameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string OemNumberField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private decimal PriceField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name {
            get {
                return this.NameField;
            }
            set {
                if ((object.ReferenceEquals(this.NameField, value) != true)) {
                    this.NameField = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string OemNumber {
            get {
                return this.OemNumberField;
            }
            set {
                if ((object.ReferenceEquals(this.OemNumberField, value) != true)) {
                    this.OemNumberField = value;
                    this.RaisePropertyChanged("OemNumber");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public decimal Price {
            get {
                return this.PriceField;
            }
            set {
                if ((this.PriceField.Equals(value) != true)) {
                    this.PriceField = value;
                    this.RaisePropertyChanged("Price");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="PartsService.IPartService")]
    public interface IPartService {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartsCount", ReplyAction="http://tempuri.org/IPartService/GetPartsCountResponse")]
        int GetPartsCount();
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartsCount", ReplyAction="http://tempuri.org/IPartService/GetPartsCountResponse")]
        System.Threading.Tasks.Task<int> GetPartsCountAsync();
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartPrice", ReplyAction="http://tempuri.org/IPartService/GetPartPriceResponse")]
        decimal GetPartPrice(int id);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartPrice", ReplyAction="http://tempuri.org/IPartService/GetPartPriceResponse")]
        System.Threading.Tasks.Task<decimal> GetPartPriceAsync(int id);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartInfo", ReplyAction="http://tempuri.org/IPartService/GetPartInfoResponse")]
        ServiceClient.PartsService.PartInfo GetPartInfo(int id);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IPartService/GetPartInfo", ReplyAction="http://tempuri.org/IPartService/GetPartInfoResponse")]
        System.Threading.Tasks.Task<ServiceClient.PartsService.PartInfo> GetPartInfoAsync(int id);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IPartServiceChannel : ServiceClient.PartsService.IPartService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class PartServiceClient : System.ServiceModel.ClientBase<ServiceClient.PartsService.IPartService>, ServiceClient.PartsService.IPartService {
        
        public PartServiceClient() {
        }
        
        public PartServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public PartServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public PartServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public PartServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public int GetPartsCount() {
            return base.Channel.GetPartsCount();
        }
        
        public System.Threading.Tasks.Task<int> GetPartsCountAsync() {
            return base.Channel.GetPartsCountAsync();
        }
        
        public decimal GetPartPrice(int id) {
            return base.Channel.GetPartPrice(id);
        }
        
        public System.Threading.Tasks.Task<decimal> GetPartPriceAsync(int id) {
            return base.Channel.GetPartPriceAsync(id);
        }
        
        public ServiceClient.PartsService.PartInfo GetPartInfo(int id) {
            return base.Channel.GetPartInfo(id);
        }
        
        public System.Threading.Tasks.Task<ServiceClient.PartsService.PartInfo> GetPartInfoAsync(int id) {
            return base.Channel.GetPartInfoAsync(id);
        }
    }
}
