Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Per your request in the comments, here's an example.</p> <p>Place all of your interfaces in a separate assembly. For purposes of this example, let's name it ServiceContracts and use the namespace <code>VERAAccessPoint.ServiceContracts</code>.</p> <p>Inside this assembly (which you'll want to create as a class library - DLL), you place <code>IVERAAccessPoint</code>, <code>IVERAAPCS</code>, <code>IClientCallback</code> and the data contract <code>ClientInfo</code>.</p> <p>Next, add add a reference to the ServiceContracts assembly in your self-hosted application and a <code>using</code> directive:</p> <p><code>using VerAAccessPoint.ServiceContracts;</code></p> <p>That way you can implement the contract interfaces and host the services.</p> <p>Finally, in your client application add the reference to the assembly and the <code>using</code> directive, and then you can do the following:</p> <pre><code>IVERAAPCS client = null; var myBinding = new NetTcpBinding(); var myEndpoint = new EndpointAddress("net.tcp://localhost:6543/hello2"); var myDuplexChannelFactory = new DuplexChannelFactory&lt;IVERAAPCS&gt;(myBinding, myEndpoint); client = myDuplexChannelFactory.CreateChannel(); </code></pre> <p>You could do something similar with <code>ChannelFactory&lt;T&gt;</code> using <code>IVERAAccessPoint</code> as well.</p> <p>I have used <code>ChannelFactory&lt;T&gt;</code> a lot, but never the <code>DuplexChannelFactory&lt;T&gt;</code>, but this should give you another option to explore.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload