Наследование: IYourService
Пример #1
0
    static void Main()
    {
        // The class implementing iYourService interface that calls that 32-bit DLL
        YourService singletoneInstance = new YourService();

        using (ServiceHost host = new ServiceHost(singletoneInstance, InteropShared.baseAddress))
        {
            // iYourService = [ServiceContract]-marked interface from the shared assembly
            host.AddServiceEndpoint(typeof(iYourService), new NetNamedPipeBinding(), InteropShared.pipeName);
            host.Open();
            InteropShared.eventHostReady.Set();
            // Wait for quit request
            InteropShared.eventHostShouldStop.WaitOne();
            host.Close();
        }
    }
Пример #2
0
 public List <TestObject> GetObjectCollection()
 {
     return(YourService.GetObjectCollection().ToList());
 }