From 1d80f84be696eb816091acb1d3077ff185483682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Thu, 20 Feb 2025 14:55:34 +1100 Subject: [PATCH] release v1.0.6 - [feat] allow accessing context from entity --- .github/workflows/dotnet.yml | 4 ---- EasyEcs.Core/Entity.cs | 5 +++++ EasyEcs.sln.DotSettings.user | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 41b1c03..2018f8a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -138,10 +138,6 @@ jobs: - name: Restore dependencies run: dotnet restore - # Build the solution - - name: Build solution - run: dotnet build --configuration Release - # Build the solution - name: Build solution run: dotnet build --configuration Release /p:OutputPath=../artifacts diff --git a/EasyEcs.Core/Entity.cs b/EasyEcs.Core/Entity.cs index 4b2ff6a..a04430b 100644 --- a/EasyEcs.Core/Entity.cs +++ b/EasyEcs.Core/Entity.cs @@ -16,6 +16,11 @@ public class Entity /// Unique identifier of the entity. /// public int Id { get; } + + /// + /// The context that holds the entity. + /// + public Context Context => _context; /// /// The context that holds the entity. diff --git a/EasyEcs.sln.DotSettings.user b/EasyEcs.sln.DotSettings.user index 3c3dff5..d8b83a0 100644 --- a/EasyEcs.sln.DotSettings.user +++ b/EasyEcs.sln.DotSettings.user @@ -5,11 +5,12 @@ ForceIncluded ForceIncluded ForceIncluded - <SessionState ContinuousTestingMode="0" IsActive="True" Name="SimpleTest" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> + <SessionState ContinuousTestingMode="0" IsActive="True" Name="SimpleTest" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"> <TestAncestor> <TestId>NUnit3x::FDA284F0-DE3A-4C46-A8B9-90324F25FCB0::net6.0::EasyEcs.UnitTest.SimpleTest</TestId> </TestAncestor> </SessionState> + \ No newline at end of file