asyncbizoperation.cs
来自「破解的飞信源代码」· CS 代码 · 共 88 行
CS
88 行
namespace Imps.Client.Core
{
using System;
using System.Runtime.CompilerServices;
public class AsyncBizOperation
{
private object _contextBiz;
private object _contextUi;
private bool? _handled;
private LightMultiMessageReceiver _lmmr;
public event EventHandler<ImpsErrorEventArgs> ImpsError;
public event EventHandler Successed;
public AsyncBizOperation()
{
}
public AsyncBizOperation(object contextForUi) : this()
{
this._contextUi = contextForUi;
}
internal void FireImpsErrorInUiThread(ImpsErrorEventArgs e)
{
LogHelper.LogImpsError(e);
FuncDispatcher.InvokeEventHandlerInUiThread<ImpsErrorEventArgs>(this, this.ImpsError, e);
}
internal void FireSuccessedInUiThread(EventArgs e)
{
FuncDispatcher.InvokeEventHandlerInUiThread(this, this.Successed, e);
}
public object ContextForBiz
{
get
{
return this._contextBiz;
}
internal set
{
this._contextBiz = value;
}
}
public object ContextForUi
{
get
{
return this._contextUi;
}
}
public bool IsImpsErrorHandled
{
get
{
bool? nullable = this._handled;
if (!nullable.get_HasValue())
{
return (null != this.ImpsError);
}
return nullable.GetValueOrDefault();
}
set
{
this._handled = new bool?(value);
}
}
public LightMultiMessageReceiver MultiMessageReceiver
{
get
{
return this._lmmr;
}
set
{
this._lmmr = value;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?