From 6735cf6029de09bb568630f5d84e14959e8d1039 Mon Sep 17 00:00:00 2001 From: Laszlo Paillat Date: Mon, 18 Oct 2021 18:08:05 +0200 Subject: [PATCH] added IEntityContainer.World property --- source/DefaultEcs/EntityMap.cs | 10 ++++------ source/DefaultEcs/EntityMultiMap.cs | 10 ++++------ source/DefaultEcs/EntitySet.cs | 10 ++++------ source/DefaultEcs/EntitySortedSet.cs | 10 ++++------ source/DefaultEcs/IEntityContainer.cs | 5 +++++ 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/source/DefaultEcs/EntityMap.cs b/source/DefaultEcs/EntityMap.cs index 12579a5e..a968ccf5 100644 --- a/source/DefaultEcs/EntityMap.cs +++ b/source/DefaultEcs/EntityMap.cs @@ -113,12 +113,6 @@ internal KeyEnumerator(EntityMap map) #region Properties - /// - /// Gets the instance from which current originate. - /// - [DebuggerBrowsable(DebuggerBrowsableState.Never)] - public World World => World.Worlds[_worldId]; - /// /// Gets the keys contained in the . /// @@ -206,6 +200,10 @@ private void On(in ComponentChangedMessage message) #region IEntityContainer + /// + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + public World World => World.Worlds[_worldId]; + /// public event EntityAddedHandler EntityAdded; diff --git a/source/DefaultEcs/EntityMultiMap.cs b/source/DefaultEcs/EntityMultiMap.cs index 4aff4730..d82e3a74 100644 --- a/source/DefaultEcs/EntityMultiMap.cs +++ b/source/DefaultEcs/EntityMultiMap.cs @@ -221,12 +221,6 @@ public bool MoveNext() #region Properties - /// - /// Gets the instance from which current originate. - /// - [DebuggerBrowsable(DebuggerBrowsableState.Never)] - public World World => World.Worlds[_worldId]; - /// /// Gets the keys contained in the . /// @@ -350,6 +344,10 @@ public bool TryGetEntities(TKey key, out ReadOnlySpan entities) #region IEntityContainer + /// + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + public World World => World.Worlds[_worldId]; + /// public event EntityAddedHandler EntityAdded; diff --git a/source/DefaultEcs/EntitySet.cs b/source/DefaultEcs/EntitySet.cs index 2e1abe30..5dccf15a 100644 --- a/source/DefaultEcs/EntitySet.cs +++ b/source/DefaultEcs/EntitySet.cs @@ -32,12 +32,6 @@ public sealed class EntitySet : IEntityContainer, ISortable #region Properties - /// - /// Gets the instance from which current originate. - /// - [DebuggerBrowsable(DebuggerBrowsableState.Never)] - public World World => World.Worlds[_worldId]; - /// /// Gets the number of in the current . /// @@ -104,6 +98,10 @@ internal EntitySet( #region IEntityContainer + /// + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + public World World => World.Worlds[_worldId]; + /// public event EntityAddedHandler EntityAdded; diff --git a/source/DefaultEcs/EntitySortedSet.cs b/source/DefaultEcs/EntitySortedSet.cs index 487298b7..042d5c97 100644 --- a/source/DefaultEcs/EntitySortedSet.cs +++ b/source/DefaultEcs/EntitySortedSet.cs @@ -33,12 +33,6 @@ public sealed class EntitySortedSet : IEntityContainer #region Properties - /// - /// Gets the instance from which current originate. - /// - [DebuggerBrowsable(DebuggerBrowsableState.Never)] - public World World => World.Worlds[_worldId]; - /// /// Gets the number of in the current . /// @@ -120,6 +114,10 @@ private void On(in ComponentChangedMessage message) #region IEntityContainer + /// + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + public World World => World.Worlds[_worldId]; + /// public event EntityAddedHandler EntityAdded; diff --git a/source/DefaultEcs/IEntityContainer.cs b/source/DefaultEcs/IEntityContainer.cs index 0946f940..d8cc50ff 100644 --- a/source/DefaultEcs/IEntityContainer.cs +++ b/source/DefaultEcs/IEntityContainer.cs @@ -4,6 +4,11 @@ namespace DefaultEcs { internal interface IEntityContainer : Internal.IEntityContainer, IDisposable { + /// + /// Gets the instance from which current originate. + /// + World World { get; } + /// /// Occurs when an is added in the current . ///