Tweak network reflection. Should fix #259

This commit is contained in:
Brant Martin
2018-10-08 18:00:40 -04:00
parent ee3dd0b5bd
commit 1d7b642c50

View File

@@ -29,8 +29,9 @@ namespace Torch.Managers
private const int GENERIC_PARAMETERS = 8; private const int GENERIC_PARAMETERS = 8;
private const int DISPATCH_PARAMETERS = 10; private const int DISPATCH_PARAMETERS = 10;
private static readonly DBNull DbNull = DBNull.Value; private static readonly DBNull DbNull = DBNull.Value;
private static readonly MethodInfo DispatchEventInfo = typeof(MyReplicationLayerBase).GetMethod("DispatchEvent", BindingFlags.NonPublic | BindingFlags.Instance); private static MethodInfo _dispatchInfo;
private static MethodInfo DispatchEventInfo => _dispatchInfo ?? (_dispatchInfo = typeof(MyReplicationLayerBase).GetMethod("DispatchEvent", BindingFlags.NonPublic | BindingFlags.Instance));
[ReflectedGetter(Name = "m_typeTable")] [ReflectedGetter(Name = "m_typeTable")]
private static Func<MyReplicationLayerBase, MyTypeTable> _typeTableGetter; private static Func<MyReplicationLayerBase, MyTypeTable> _typeTableGetter;