Skip to content

Commit

Permalink
-Event:Refactorying folder
Browse files Browse the repository at this point in the history
  • Loading branch information
奶泡泡 committed Apr 23, 2022
1 parent 3cacf4e commit b7e525b
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 32 deletions.
Binary file not shown.
7 changes: 0 additions & 7 deletions Packages/com.popo.bdframework/Runtime/Event/@hotfix.zip.meta

This file was deleted.

3 changes: 0 additions & 3 deletions Packages/com.popo.bdframework/Runtime/Event/@main.meta

This file was deleted.

3 changes: 3 additions & 0 deletions Packages/com.popo.bdframework/Runtime/Event/Core.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace BDFramework.DataListener
{
/// <summary>
/// 状态事件监听扩展版本
/// 状态(事件)监听扩展
/// </summary>
unsafe static public class StatusListenerExtensionT
unsafe static public class EventListenerEx
{
/// <summary>
/// T版本监听一次
/// 监听一次
/// </summary>
/// <param name="name"></param>
/// <param name="callback"></param>
Expand All @@ -20,7 +20,7 @@ static public void AddListenerOnce<T>(this AStatusListener dl, Action<T> callbac


/// <summary>
/// 状态监听泛型版本
/// 状态(事件)监听 T
/// </summary>
/// <param name="dl"></param>
/// <param name="name">监听数据名</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

namespace ILRuntime.Runtime.Generated
{
unsafe class StatusListenerTHelper
unsafe class EventListenerEx_ILRuntimeAdaptor
{
public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain app)
{
MethodBase method;
Type[] args;
Type type = typeof(BDFramework.DataListener.StatusListenerExtensionT);
Type type = typeof(BDFramework.DataListener.EventListenerEx);
Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
List<MethodInfo> lst = null;
foreach (var m in type.GetMethods())
Expand Down
3 changes: 3 additions & 0 deletions Packages/com.popo.bdframework/Runtime/Event/Service.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@

namespace ILRuntime.Runtime.Generated
{
unsafe class StatusListenerEnumHelper
/// <summary>
/// 值监听的ilr拓展
/// </summary>
unsafe class ValueListenerEnumHelper
{
public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain app)
{
BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
MethodBase method;
Type[] args;
Type type = typeof(BDFramework.DataListener.StatusListenerExtensionEnum);
Type type = typeof(BDFramework.DataListener.ValueListenerEx);
args = new Type[]{typeof(BDFramework.DataListener.AStatusListener), typeof(System.Enum), typeof(System.Object), typeof(System.Boolean)};
method = type.GetMethod("SetData", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, SetData_0);
Expand Down Expand Up @@ -122,7 +125,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.SetData(@dl,@name, @value, @isTriggerCallback);
BDFramework.DataListener.ValueListenerEx.SetData(@dl,@name, @value, @isTriggerCallback);

return __ret;
}
Expand All @@ -144,7 +147,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


var result_of_this_method = BDFramework.DataListener.StatusListenerExtensionEnum.GetData<System.Int32>(@dl, @name);
var result_of_this_method = BDFramework.DataListener.ValueListenerEx.GetData<System.Int32>(@dl, @name);

__ret->ObjectType = ObjectTypes.Integer;
__ret->Value = result_of_this_method;
Expand Down Expand Up @@ -181,7 +184,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.AddListener(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);
BDFramework.DataListener.ValueListenerEx.AddListener(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);

return __ret;
}
Expand Down Expand Up @@ -213,7 +216,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.AddListenerOnce(@dl, @name, @callback, @oder, @isTriggerCacheData);
BDFramework.DataListener.ValueListenerEx.AddListenerOnce(@dl, @name, @callback, @oder, @isTriggerCacheData);

return __ret;
}
Expand All @@ -235,7 +238,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.RemoveListener(@dl, @name);
BDFramework.DataListener.ValueListenerEx.RemoveListener(@dl, @name);

return __ret;
}
Expand All @@ -257,7 +260,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.ClearListener(@dl, @name);
BDFramework.DataListener.ValueListenerEx.ClearListener(@dl, @name);

return __ret;
}
Expand Down Expand Up @@ -286,7 +289,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.TriggerEvent(@dl, @name, @value, @isTriggerCallback);
BDFramework.DataListener.ValueListenerEx.TriggerEvent(@dl, @name, @value, @isTriggerCallback);

return __ret;
}
Expand Down Expand Up @@ -321,7 +324,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.AddListener<System.Object>(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);
BDFramework.DataListener.ValueListenerEx.AddListener<System.Object>(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);

return __ret;
}
Expand Down Expand Up @@ -356,7 +359,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.AddListener<ILRuntime.Runtime.Intepreter.ILTypeInstance>(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);
BDFramework.DataListener.ValueListenerEx.AddListener<ILRuntime.Runtime.Intepreter.ILTypeInstance>(@dl, @name, @action, @order, @triggerNum, @isTriggerCacheData);

return __ret;
}
Expand All @@ -382,7 +385,7 @@ public static void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain
__intp.Free(ptr_of_this_method);


BDFramework.DataListener.StatusListenerExtensionEnum.RemoveListener(@dl, @name, @callback);
BDFramework.DataListener.ValueListenerEx.RemoveListener(@dl, @name, @callback);

return __ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace BDFramework.DataListener
{
/// <summary>
/// 状态事件监听扩展版本
/// 值监听扩展版本
/// </summary>
static public class StatusListenerExtensionEnum
static public class ValueListenerEx
{
#region 枚举版本

/// <summary>
/// 枚举版本
/// </summary>
Expand Down Expand Up @@ -166,6 +166,5 @@ static public void RemoveListener(this AStatusListener dl, string name)
{
dl.RemoveListener(name);
}
#endregion
}
}

0 comments on commit b7e525b

Please sign in to comment.