feat: added preserver class & method to preserve assembly loading
This commit is contained in:
		
							
								
								
									
										10
									
								
								Engine.Core/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Engine.Core/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
namespace Syntriax.Engine.Core
 | 
			
		||||
{
 | 
			
		||||
    // This is pretty much so the assembly gets loaded automatically because 
 | 
			
		||||
    // the builds include the assembly but sometimes doesn't link load it at startup.
 | 
			
		||||
    // I will hopefully one day fix it and remove this. 
 | 
			
		||||
    public static class Preserver
 | 
			
		||||
    {
 | 
			
		||||
        public static void Preserve() { }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								Engine.Physics2D/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Engine.Physics2D/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
namespace Syntriax.Engine.Physics2D
 | 
			
		||||
{
 | 
			
		||||
    // This is pretty much so the assembly gets loaded automatically because 
 | 
			
		||||
    // the builds include the assembly but sometimes doesn't link load it at startup.
 | 
			
		||||
    // I will hopefully one day fix it and remove this. 
 | 
			
		||||
    public static class Preserver
 | 
			
		||||
    {
 | 
			
		||||
        public static void Preserve() { }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								Engine.Systems/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Engine.Systems/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
namespace Syntriax.Engine.Systems
 | 
			
		||||
{
 | 
			
		||||
    // This is pretty much so the assembly gets loaded automatically because 
 | 
			
		||||
    // the builds include the assembly but sometimes doesn't link load it at startup.
 | 
			
		||||
    // I will hopefully one day fix it and remove this.
 | 
			
		||||
    public static class Preserver
 | 
			
		||||
    {
 | 
			
		||||
        public static void Preserve() { }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -4,6 +4,7 @@
 | 
			
		||||
    <TargetFramework>net8.0</TargetFramework>
 | 
			
		||||
    <ImplicitUsings>enable</ImplicitUsings>
 | 
			
		||||
    <Nullable>enable</Nullable>
 | 
			
		||||
    <RootNamespace>Syntriax.Engine</RootNamespace>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								Engine/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Engine/Preserver.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
namespace Syntriax.Engine
 | 
			
		||||
{
 | 
			
		||||
    // This is pretty much so the assembly gets loaded automatically because 
 | 
			
		||||
    // the builds include the assembly but sometimes doesn't link load it at startup.
 | 
			
		||||
    // I will hopefully one day fix it and remove this. 
 | 
			
		||||
    public static class Preserver
 | 
			
		||||
    {
 | 
			
		||||
        public static void Preserve()
 | 
			
		||||
        {
 | 
			
		||||
            Core.Preserver.Preserve();
 | 
			
		||||
            Physics2D.Preserver.Preserve();
 | 
			
		||||
            Systems.Preserver.Preserve();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user