MCPcopy Create free account
hub / github.com/Tencent/xLua / GetDelegateWrap

Method GetDelegateWrap

Assets/XLua/Src/MethodWarpsCache.cs:440–452  ·  view source on GitHub ↗
(Type type)

Source from the content-addressed store, hash-verified

438 }
439
440 public LuaCSFunction GetDelegateWrap(Type type)
441 {
442 //UnityEngine.Debug.LogWarning("GetDelegateWrap:" + type );
443 if (!typeof(Delegate).IsAssignableFrom(type))
444 {
445 return null;
446 }
447 if (!delegateCache.ContainsKey(type))
448 {
449 delegateCache[type] = _GenMethodWrap(type, type.ToString(), new MethodBase[] { type.GetMethod("Invoke") }).Call;
450 }
451 return delegateCache[type];
452 }
453
454 public LuaCSFunction GetEventWrap(Type type, string eventName)
455 {

Callers 1

DelegateCallFunction · 0.80

Calls 1

ToStringMethod · 0.45

Tested by

no test coverage detected