public static bool ReflectionUnitTest( ) { try { Type type1 = SandboxGameAssemblyWrapper.Instance.GetAssemblyType(PowerReceiverNamespace, PowerReceiverClass); if (type1 == null) { throw new Exception("Could not find internal type for PowerReceiver"); } bool result = true; result &= BaseObject.HasMethod(type1, PowerReceiverRunPowerRateCallbackMethod); result &= BaseObject.HasMethod(type1, PowerReceiverGetCurrentInputMethod); result &= BaseObject.HasMethod(type1, PowerReceiverGetCurrentRateMethod); result &= BaseObject.HasMethod(type1, PowerReceiverSetMaxRequiredInputMethod); result &= BaseObject.HasField(type1, PowerReceiverMaxRequiredInputField); result &= BaseObject.HasField(type1, PowerReceiverPowerRatioField); result &= BaseObject.HasField(type1, PowerReceiverInputRateCallbackField); return(result); } catch (Exception ex) { LogManager.ErrorLog.WriteLine(ex); return(false); } }
new public static bool ReflectionUnitTest() { try { Type type = InternalType; if (type == null) { throw new Exception("Could not find internal type for InventoryItemEntity"); } bool result = true; result &= BaseObject.HasMethod(type, InventoryItemGetObjectBuilderMethod); result &= BaseObject.HasField(type, InventoryItemItemIdField); return(result); } catch (Exception ex) { LogManager.APILog.WriteLine(ex); return(false); } }