コード例 #1
0
        void AppNotifyService_NotifyData(object sender, AppNotifyDataEventArgs e)
        {
            ModuleProc PROC = new ModuleProc("AppNotifyService", "Subscribe");

            try
            {
                if (((ICommunicationObject)_callback).State == CommunicationState.Opened)
                {
                    try
                    {
                        _callback.NotifyData(e.Data);
                    }
                    catch
                    {
                        this.Unsubscribe();
                    }
                }
                else
                {
                    this.Unsubscribe();
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
                this.Unsubscribe();
            }
        }
コード例 #2
0
        void AppNotifyService_NotifyData(object sender, AppNotifyDataEventArgs e)
        {
            ModuleProc PROC = new ModuleProc("AppNotifyService", "Subscribe");

            try
            {
                if (((ICommunicationObject)_callback).State == CommunicationState.Opened)
                {
                    try
                    {
                        _callback.NotifyData(e.Data);
                    }
                    catch
                    {
                        this.Unsubscribe();
                    }
                }
                else
                {
                    this.Unsubscribe();
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
                this.Unsubscribe();
            }
        }