/// <summary> /// 枚举版本 /// </summary> /// <param name="name"></param> /// <param name="value"></param> /// <param name="isUseCallback"></param> static public void TriggerEvent(this ADataListener dl, Enum name, object value = null, bool isUseCallback = true) { dl.TriggerEvent(name.ToString(), value, isUseCallback); }
/// <summary> /// T版本触发监听 /// </summary> /// <param name="name"></param> /// <param name="value"></param> /// <param name="isTriggerCallback"></param> static public void TriggerEvent <T>(this ADataListener dl, T value = null) where T : class { dl.TriggerEvent(typeof(T).FullName, value, true); }
/// <summary> /// T版本触发监听 /// </summary> /// <param name="name"></param> /// <param name="value"></param> /// <param name="isTriggerCallback"></param> static public void TriggerEvent(this ADataListener dl, object value = null, bool isTriggerCallback = true) { dl.TriggerEvent(value.GetType().FullName, value, isTriggerCallback); }