Exemple #1
0
        /// <summary>
        /// 发送内部消息。
        /// </summary>
        /// <param name="messageCode">消息码。</param>
        /// <param name="contentType">消息内容的类型。</param>
        /// <param name="content">消息内容。</param>
        /// <returns></returns>
        public InternalMessage SendInternalMessage(Int32 messageCode, Core.ContentType contentType, Object content)
        {
            InternalMessage message = new InternalMessage(messageCode, contentType, content);

            Proxy.OnInternalReceive(message);
            return(message);
        }
Exemple #2
0
 private void OnReceiveInternalMessage(InternalMessage message)
 {
     if (ReceiveInternalMessage != null)
     {
         ReceiveInternalMessage(this, message);
     }
 }
        public static void SendInternalMessage(this IAddin sender, InternalMessage message)
        {
            if (AppDomain.CurrentDomain.IsDefaultAppDomain())
            {
                return;
            }
            WpfAddinProxy proxy = AppDomain.CurrentDomain.GetData("proxy") as WpfAddinProxy;

            proxy?.OnSendInternalMessage(message);
        }
        public static void SendInternalMessage(this IAddin sender, Int32 messageCode, ContentType contentType, Object content)
        {
            InternalMessage message = new InternalMessage(messageCode, contentType, content);

            SendInternalMessage(sender, message);
        }
 internal void OnSendInternalMessage(InternalMessage message)
 {
     Transceiver?.TransmitInternalMessage(message);
 }
 public void OnInternalReceive(InternalMessage message)
 {
     ((IWpfAddin)Target).OnInternalReceive(message);
 }
Exemple #7
0
 internal void TransmitInternalMessage(InternalMessage message)
 {
     OnReceiveInternalMessage(message);
 }
Exemple #8
0
 /// <summary>
 /// 当收到内部消息时执行。
 /// </summary>
 /// <param name="message">消息。</param>
 public virtual void OnInternalReceive(InternalMessage message)
 {
 }