Click here to Skip to main content
15,881,413 members
Articles / Desktop Programming / WPF

Modeling M-V-VM

Rate me:
Please Sign up or sign in to vote.
3.71/5 (8 votes)
5 Jun 2009CPOL2 min read 26.9K   312   23  
An article which tries to present an approach for decoupling M-V-VM View Model objects
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3053
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace TestTreeViewWithRightBarView.WorldServiceReference {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="WorldServiceReference.IWorldDataService")]
    public interface IWorldDataService {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWorldDataService/GetContinentSizeInSquareMiles", ReplyAction="http://tempuri.org/IWorldDataService/GetContinentSizeInSquareMilesResponse")]
        double GetContinentSizeInSquareMiles(string strContinent);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWorldDataService/GetCountryCurrency", ReplyAction="http://tempuri.org/IWorldDataService/GetCountryCurrencyResponse")]
        WorldDataLib.Model.CurrenciesEnum GetCountryCurrency(string strCountry);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWorldDataService/GetCityCurrentTemprature", ReplyAction="http://tempuri.org/IWorldDataService/GetCityCurrentTempratureResponse")]
        double GetCityCurrentTemprature(string strCity);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IWorldDataServiceChannel : TestTreeViewWithRightBarView.WorldServiceReference.IWorldDataService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class WorldDataServiceClient : System.ServiceModel.ClientBase<TestTreeViewWithRightBarView.WorldServiceReference.IWorldDataService>, TestTreeViewWithRightBarView.WorldServiceReference.IWorldDataService {
        
        public WorldDataServiceClient() {
        }
        
        public WorldDataServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public WorldDataServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public WorldDataServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public WorldDataServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public double GetContinentSizeInSquareMiles(string strContinent) {
            return base.Channel.GetContinentSizeInSquareMiles(strContinent);
        }
        
        public WorldDataLib.Model.CurrenciesEnum GetCountryCurrency(string strCountry) {
            return base.Channel.GetCountryCurrency(strCountry);
        }
        
        public double GetCityCurrentTemprature(string strCity) {
            return base.Channel.GetCityCurrentTemprature(strCity);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Israel Israel
Software Developer in a promising Clean-Tech company

Comments and Discussions