1.协议

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace WCFHub.IService
{
    [ServiceContract(CallbackContract=typeof(IEventCallback))]
    public interface IEventService
    {
        [OperationContract(IsOneWay = true)]
        void Subscribe(SubscribeArg a);

        [OperationContract(IsOneWay = true)]
        void Unsubscribe(ArgumentBase<String> a);

        [OperationContract]
        DateTime Ping();

    }

    public interface IEventCallback
    {
         [OperationContract(IsOneWay = true)]
        void OnMessageReceived(ArgumentBase<String> a);
    }
}
View Code

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2021-11-27
  • 2021-11-27
  • 2021-04-05
  • 2021-12-16
  • 2022-01-01
猜你喜欢
  • 2021-06-29
  • 2021-08-17
  • 2021-11-27
  • 2022-01-03
  • 2021-06-15
  • 2021-12-23
相关资源
相似解决方案