Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Runtime Generated WCF Service Exposing .NET or COM Types

, 24 Apr 2008 CPOL
A WCF service wrapper is generated at runtime around a .NET or COM type to expose its interface.
runtimegen_wcf_service_expnetcom_demo.zip
ConsoleClient.exe
DummyComInterop.exe
ServiceHostContainer.exe
ComponentCom.dll
ComponentNet.dll
ComponentNetBase.dll
ComponetNetBase2.dll
Interop.ComponentComLib.dll
WcfServiceHost.dll
runtimegen_wcf_service_expnetcom_src.zip
ConsoleClient
Properties
Service References
Class1
configuration.svcinfo
Reference.svcmap
service.wsdl
Class1_PerCall
configuration.svcinfo
Reference.svcmap
service.wsdl
Class2
configuration.svcinfo
Reference.svcmap
service.wsdl
Class2_PerCall
configuration.svcinfo
Reference.svcmap
service.wsdl
DummyComInterop
Properties
ServiceHostContainer
Properties
WcfServiceHost
Properties
WcfServiceHost.csproj.user
ComponentCom
Class2.rgs
ComponentCom.def
ComponentCom.rgs
ComponentCom.vcproj.vspscc
ComponentComps.def
ComponentNet
Properties
ComponentNetBase
Properties
ComponetNetBase2
Properties
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1433
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace ConsoleClient.Class2_PerCall {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="Class2_PerCall.IClass2_PerCall")]
    public interface IClass2_PerCall {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClass2_PerCall/Method1", ReplyAction="http://tempuri.org/IClass2_PerCall/Method1Response")]
        string Method1(ref string bsParam1, ref int lParam2);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IClass2_PerCallChannel : ConsoleClient.Class2_PerCall.IClass2_PerCall, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class Class2_PerCallClient : System.ServiceModel.ClientBase<ConsoleClient.Class2_PerCall.IClass2_PerCall>, ConsoleClient.Class2_PerCall.IClass2_PerCall {
        
        public Class2_PerCallClient() {
        }
        
        public Class2_PerCallClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public Class2_PerCallClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public Class2_PerCallClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public Class2_PerCallClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public string Method1(ref string bsParam1, ref int lParam2) {
            return base.Channel.Method1(ref bsParam1, ref lParam2);
        }
    }
}

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)

Share

About the Author

Igor Ladnik
Architect
Israel Israel


  • Nov 2010: Code Project Contests - Windows Azure Apps - Winner
  • Feb 2011: Code Project Contests - Windows Azure Apps - Grand Prize Winner

Follow on   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150129.1 | Last Updated 24 Apr 2008
Article Copyright 2008 by Igor Ladnik
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid