Interface/Interface.cs
author sl
Thu, 14 Aug 2014 18:37:23 +0200
changeset 29 c4e03315035c
parent 24 f442150ff735
child 30 c375286d1a1c
permissions -rw-r--r--
Client/Server duplex is still a mess in C#.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Text;
     5 using System.Threading.Tasks;
     6 using System.ServiceModel;
     7 using System.Collections;
     8 
     9 
    10 namespace SharpDisplayInterface
    11 {
    12 
    13     [ServiceContract(CallbackContract = typeof(IDisplayServiceCallback))]
    14     public interface IDisplayService
    15     {
    16         [OperationContract(IsOneWay = true)]
    17         void Connect(string aClientName);
    18 
    19         [OperationContract(IsOneWay = true)]
    20         void Disconnect(string aClientName);
    21 
    22         [OperationContract(IsOneWay = true)]
    23         void SetText(int aLineIndex, string aText);
    24 
    25         [OperationContract(IsOneWay = true)]
    26         void SetTexts(System.Collections.Generic.IList<string> aTexts);
    27     }
    28 
    29 
    30     public interface IDisplayServiceCallback
    31     {
    32         [OperationContract(IsOneWay = true)]
    33         void OnConnected();
    34 
    35         [OperationContract(IsOneWay = true)]
    36         void OnServerClosing();
    37     }
    38 
    39 
    40 
    41 }