/// <summary> /// 实现销毁接口,防止没有调用Close方法 /// </summary> public void Dispose() { if (infoCodeList != null && infoCodeList.Count > 0) { InfoLocalHelper.RevokeInfo(this); } }
/// <summary> /// 信息功能关闭 /// </summary> public void Close() { if (infoCodeList.Count > 0) { InfoLocalHelper.RevokeInfo(this); infoCodeList = null; } }
/// <summary> /// 构造函数 /// </summary> /// <param name="codes">接受的信息列表</param> /// <param name="callback">回调函数</param> public InfoLocalAction(List <String> codes, OnCallbackInfo callback) { infoCodeList = codes; callbackInfo = callback; // 注册信息码 if (infoCodeList.Count > 0) { InfoLocalHelper.RegisterInfo(this, infoCodeList); } }