//数据更新必须调用的方法,code为业务协议号码 public void DataUpdate(int code = 0) { //线程安全处理 DataUpateHandler localUpdated = handlList; if (localUpdated != null) { foreach (DataUpateHandler handler in localUpdated.GetInvocationList()) { //事件处理 handler(this, code); } } }
public void DataUpdate(int code = 0) { DataUpateHandler dataUpateHandler = this.handlList; if (dataUpateHandler != null) { Delegate[] invocationList = dataUpateHandler.GetInvocationList(); for (int i = 0; i < invocationList.Length; i++) { DataUpateHandler dataUpateHandler2 = (DataUpateHandler)invocationList[i]; dataUpateHandler2(this, code); } } }