Compare commits

...

3 Commits

Author SHA1 Message Date
DCFApixels
f23f9692a2 defines refactoring 2025-03-14 16:53:33 +08:00
DCFApixels
99f6c30e2e fix 2025-03-14 15:00:53 +08:00
DCFApixels
4b4fb185eb add .md extension for LICENSE 2025-03-14 14:24:58 +08:00
12 changed files with 46 additions and 12 deletions

View File

View File

@ -1,4 +1,7 @@
using DCFApixels.DragonECS.AutoInjections.Internal;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using DCFApixels.DragonECS.AutoInjections.Internal;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,4 +1,7 @@
using DCFApixels.DragonECS.PoolsCore;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using DCFApixels.DragonECS.PoolsCore;
using System;
using System.Linq;

View File

@ -1,4 +1,7 @@
using System;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using System;
namespace DCFApixels.DragonECS
{

View File

@ -1,3 +1,6 @@
#if DISABLE_DEBUG
#undef DEBUG
#endif
using DCFApixels.DragonECS.AutoInjections;
using DCFApixels.DragonECS.AutoInjections.Internal;
using System;
@ -63,7 +66,7 @@ namespace DCFApixels.DragonECS
{
return false;
}
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
#if DEBUG || ENABLE_DRAGONECS_ASSERT_CHEKS
if (!isAgressiveInjection && o.CanWrite == false) { Throw.PropertyIsCantWrite(o); }
#endif
return o.CanWrite == false;
@ -78,7 +81,7 @@ namespace DCFApixels.DragonECS
return false;
}
var parameters = o.GetParameters();
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
#if DEBUG || ENABLE_DRAGONECS_ASSERT_CHEKS
if (!isAgressiveInjection)
{
if (o.IsGenericMethod) { Throw.MethodIsGeneric(o); }
@ -210,8 +213,10 @@ namespace DCFApixels.DragonECS
static AutoInjectSystem()
{
EcsAspect.OnInit -= EcsAspect_OnInit;
EcsAspect.OnInit += EcsAspect_OnInit;
EcsAspect.OnAfterInit += EcsAspect_OnBuild; ;
EcsAspect.OnAfterInit -= EcsAspect_OnBuild;
EcsAspect.OnAfterInit += EcsAspect_OnBuild;
}
private static void EcsAspect_OnInit(object aspect, EcsAspect.Builder builder)

View File

@ -1,4 +1,8 @@
namespace DCFApixels.DragonECS
#if DISABLE_DEBUG
#undef DEBUG
#endif
namespace DCFApixels.DragonECS
{
public static class AutoInjectSystemExtensions
{

View File

@ -1,4 +1,8 @@
using System;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using System;
[AttributeUsage(AttributeTargets.Interface, Inherited = false, AllowMultiple = false)]
public sealed class BindWithRunnerAttribute : Attribute
{

View File

@ -1,4 +1,7 @@
using DCFApixels.DragonECS.AutoInjections.Internal;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using DCFApixels.DragonECS.AutoInjections.Internal;
using System;
using System.Reflection;

View File

@ -1,4 +1,7 @@
using System;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using System;
using System.Reflection;
namespace DCFApixels.DragonECS

View File

@ -1,4 +1,7 @@
using System;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using System;
using System.Reflection;
using System.Runtime.CompilerServices;

View File

@ -1,4 +1,7 @@
using System;
#if DISABLE_DEBUG
#undef DEBUG
#endif
using System;
using System.Reflection;
using System.Runtime.CompilerServices;