SEModAPIInternal.API.Common.FactionsManager.ReflectionUnitTest C# (CSharp) Method

ReflectionUnitTest() public static method

public static ReflectionUnitTest ( ) : bool
return bool
        public static bool ReflectionUnitTest( )
        {
            try
            {
                Type type1 = SandboxGameAssemblyWrapper.Instance.GetAssemblyType( FactionManagerNamespace, FactionManagerClass );
                if ( type1 == null )
                    throw new Exception( "Could not find internal type for FactionsManager" );
                bool result = true;
                result &= Reflection.HasMethod( type1, FactionManagerGetFactionCollectionMethod );
                result &= Reflection.HasMethod( type1, FactionManagerGetFactionByIdMethod );
                result &= Reflection.HasMethod( type1, FactionManagerRemoveFactionByIdMethod );

                result &= Reflection.HasMethod( type1, FactionNetManagerRemoveFactionMethod );
                result &= Reflection.HasMethod( type1, FactionNetManagerRemoveMemberMethod );

                return result;
            }
            catch ( Exception ex )
            {
                Log.Error( ex );
                return false;
            }
        }