diff --git a/docs/coverage/DefaultEcs_AComponentSystem_2.htm b/docs/coverage/DefaultEcs_AComponentSystem_2.htm index ab7bfb2e..c487d712 100644 --- a/docs/coverage/DefaultEcs_AComponentSystem_2.htm +++ b/docs/coverage/DefaultEcs_AComponentSystem_2.htm @@ -17,11 +17,11 @@

< Summary

Class:DefaultEcs.System.AComponentSystem`2 Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\System\AComponentSystem.cs -Covered lines:15 -Uncovered lines:1 +Covered lines:16 +Uncovered lines:0 Coverable lines:16 Total lines:98 -Line coverage:93.7% (15 of 16) +Line coverage:100% (16 of 16) Covered branches:8 Total branches:8 Branch coverage:100% (8 of 8) @@ -33,7 +33,7 @@

Metrics

.ctor(...)20100%100% .ctor(...)10100%100% -Update(...)100%100% +Update(...)10100%100% Update(...)20100%100% Update(...)20100%100% Dispose()10100%100% @@ -94,7 +94,7 @@

D:\Projects  48        /// </summary>  49        /// <param name="state">The state to use.</param>  50        /// <param name="component">The <typeparamref name="TComponent"/> to update.</param> - 051        protected virtual void Update(TState state, ref TComponent component) { } + 651        protected virtual void Update(TState state, ref TComponent component) { }  52  53        /// <summary>  54        /// Update the given <typeparamref name="TComponent"/> once. @@ -144,7 +144,7 @@

D:\Projects  98} - +

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_AEntitySystem_1.htm b/docs/coverage/DefaultEcs_AEntitySystem_1.htm index 8ed685e1..afd39286 100644 --- a/docs/coverage/DefaultEcs_AEntitySystem_1.htm +++ b/docs/coverage/DefaultEcs_AEntitySystem_1.htm @@ -17,11 +17,11 @@

< Summary

Class:DefaultEcs.System.AEntitySystem`1 Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\System\AEntitySystem.cs -Covered lines:28 -Uncovered lines:3 +Covered lines:31 +Uncovered lines:0 Coverable lines:31 Total lines:155 -Line coverage:90.3% (28 of 31) +Line coverage:100% (31 of 31) Covered branches:10 Total branches:10 Branch coverage:100% (10 of 10) @@ -32,14 +32,14 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage add_EntityAdded(...)10100%100% -remove_EntityAdded(...)100%100% +remove_EntityAdded(...)10100%100% add_EntityRemoved(...)10100%100% -remove_EntityRemoved(...)100%100% +remove_EntityRemoved(...)10100%100% .ctor(...)20100%100% .ctor(...)10100%100% .ctor(...)20100%100% .ctor(...)10100%100% -Update(T,DefaultEcs.Entity& modreq(...)100%100% +Update(T,DefaultEcs.Entity& modreq(...)10100%100% Update(...)20100%100% Update(...)20100%100% PostUpdate(...)10100%100% @@ -72,7 +72,7 @@

D:\Projects\De  19        public event ActionIn<Entity> EntityAdded  20        {  221            add => _set.EntityAdded += value; - 022            remove => _set.EntityAdded -= value; + 122            remove => _set.EntityAdded -= value;  23        }  24  25        /// <summary> @@ -81,7 +81,7 @@

D:\Projects\De  28        public event ActionIn<Entity> EntityRemoved  29        {  130            add => _set.EntityRemoved += value; - 031            remove => _set.EntityRemoved -= value; + 131            remove => _set.EntityRemoved -= value;  32        }  33  34        #endregion @@ -141,7 +141,7 @@

D:\Projects\De  88        /// </summary>  89        /// <param name="state">The state to use.</param>  90        /// <param name="entity">The <see cref="Entity"/> instance to update.</param> - 091        protected virtual void Update(T state, in Entity entity) { } + 1291        protected virtual void Update(T state, in Entity entity) { }  92  93        /// <summary>  94        /// Update the given <see cref="Entity"/> instances once. @@ -208,7 +208,7 @@

D:\Projects\De  155} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_AResourceManager_2.htm b/docs/coverage/DefaultEcs_AResourceManager_2.htm index 96b93637..5aa65f45 100644 --- a/docs/coverage/DefaultEcs_AResourceManager_2.htm +++ b/docs/coverage/DefaultEcs_AResourceManager_2.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.Resource.AResourceManager`2 Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\Resource\AResourceManager.cs -Covered lines:41 -Uncovered lines:3 +Covered lines:44 +Uncovered lines:0 Coverable lines:44 Total lines:175 -Line coverage:93.1% (41 of 44) -Covered branches:20 +Line coverage:100% (44 of 44) +Covered branches:31 Total branches:32 -Branch coverage:62.5% (20 of 32) +Branch coverage:96.8% (31 of 32)

Metrics

@@ -36,12 +36,12 @@

Metrics

RemoveReference()10100%100% .ctor()10100%100% On(...)20100%100% -On(...)80100%87.5% +On(...)80100%100% On(...)20100%100% On(...)20100%100% >c__DisplayClass10_0/<<Manage()60100%83.33% -Manage(...)6060%16.66% -Dispose()6075%16.66% +Manage(...)60100%100% +Dispose()60100%100%

File(s)

@@ -76,15 +76,15 @@

D:\Projec  25  26            private int _referencesCount;  27 - 528            public Resource(TResource value) + 628            public Resource(TResource value)  29            { - 530                Value = value; - 531                _referencesCount = 0; - 532            } + 630                Value = value; + 631                _referencesCount = 0; + 632            }  33 - 734            public void AddReference() => ++_referencesCount; + 834            public void AddReference() => ++_referencesCount;  35 - 736            public bool RemoveReference() => --_referencesCount == 0; + 536            public bool RemoveReference() => --_referencesCount == 0;  37        }  38  39        #endregion @@ -115,31 +115,31 @@

D:\Projec  64        {  65            Resource resource;  66 - 767            lock (_lockObject) + 867            lock (_lockObject)  68            { - 769                if (!_resources.TryGetValue(message.ManagedResource.Info, out resource)) + 869                if (!_resources.TryGetValue(message.ManagedResource.Info, out resource))  70                { - 571                    resource = new Resource(Load(message.ManagedResource.Info)); - 572                    _resources.Add(message.ManagedResource.Info, resource); + 671                    resource = new Resource(Load(message.ManagedResource.Info)); + 672                    _resources.Add(message.ManagedResource.Info, resource);  73                }  74 - 775                resource.AddReference(); - 776            } + 875                resource.AddReference(); + 876            }  77 - 778            OnResourceLoaded(message.Entity, message.ManagedResource.Info, resource.Value); - 779        } + 878            OnResourceLoaded(message.Entity, message.ManagedResource.Info, resource.Value); + 879        }  80  81        private void On(in ManagedResourceReleaseMessage<ManagedResource<TInfo, TResource>> message)  82        { - 783            lock (_lockObject) + 883            lock (_lockObject)  84            { - 785                if (_resources.TryGetValue(message.ManagedResource.Info, out Resource resource) && resource.RemoveRefere + 885                if (_resources.TryGetValue(message.ManagedResource.Info, out Resource resource) && resource.RemoveRefere  86                { - 587                    resource.Value?.Dispose(); - 588                    _resources.Remove(message.ManagedResource.Info); + 387                    resource.Value?.Dispose(); + 388                    _resources.Remove(message.ManagedResource.Info);  89                } - 790            } - 791        } + 890            } + 891        }  92  93        private void On(in ManagedResourceRequestMessage<ManagedResource<TInfo[], TResource>> message)  94        { @@ -193,11 +193,11 @@

D:\Projec  4142            }  143  4144            ComponentPool<ManagedResource<TInfo, TResource>> components = ComponentManager<ManagedResource<TInfo, TResou - 4145            if (components != null) + 4145            if (components != null)  146            { - 0147                foreach (Entity entity in world.GetAllEntities().Where(e => components.Has(e.EntityId))) + 5147                foreach (Entity entity in world.GetAllEntities().Where(e => components.Has(e.EntityId)))  148                { - 0149                    On(new ManagedResourceRequestMessage<ManagedResource<TInfo, TResource>>(entity, components.Get(entit + 1149                    On(new ManagedResourceRequestMessage<ManagedResource<TInfo, TResource>>(entity, components.Get(entit  150                }  151            }  152 @@ -213,9 +213,9 @@

D:\Projec  162        /// </summary>  163        public void Dispose()  164        { - 8165            foreach (Resource resource in _resources.Values) + 14165            foreach (Resource resource in _resources.Values)  166            { - 0167                resource.Value?.Dispose(); + 3167                resource.Value?.Dispose();  168            }  169  4170            _resources.Clear(); @@ -226,7 +226,7 @@

D:\Projec  175} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ASystem_1.htm b/docs/coverage/DefaultEcs_ASystem_1.htm index deadc755..f8abfb5c 100644 --- a/docs/coverage/DefaultEcs_ASystem_1.htm +++ b/docs/coverage/DefaultEcs_ASystem_1.htm @@ -18,10 +18,10 @@

< Summary

Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\System\ASystem.cs Covered lines:13 -Uncovered lines:2 -Coverable lines:15 -Total lines:92 -Line coverage:86.6% (13 of 15) +Uncovered lines:0 +Coverable lines:13 +Total lines:85 +Line coverage:100% (13 of 13) Covered branches:4 Total branches:4 Branch coverage:100% (4 of 4) @@ -32,10 +32,9 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage .ctor(...)20100%100% -.ctor()100%100% -PreUpdate(...)10100%100% -PostUpdate(...)10100%100% -Update(...)20100%100% +PreUpdate(...)10100%100% +PostUpdate(...)10100%100% +Update(...)20100%100%

File(s)

@@ -71,82 +70,74 @@

D:\Projects\DefaultE  1826            IsEnabled = true;  1827        }  2829        /// <summary>30        /// Initialise a new instance of the <see cref="ASystem{T}"/> class.31        /// </summary>32        protected ASystem() - 033            : this(null) - 034        { }3536        #endregion3738        #region Methods3940        internal abstract void Update(int index, int maxIndex);4142        /// <summary>43        /// Performs a pre-update treatment.44        /// </summary>45        /// <param name="state">The state to use.</param> - 646        protected virtual void PreUpdate(T state) { }4748        /// <summary>49        /// Performs a post-update treatment.50        /// </summary>51        /// <param name="state">The state to use.</param> - 852        protected virtual void PostUpdate(T state) { }5354        #endregion29        #endregion3031        #region Methods3233        internal abstract void Update(int index, int maxIndex);3435        /// <summary>36        /// Performs a pre-update treatment.37        /// </summary>38        /// <param name="state">The state to use.</param> + 639        protected virtual void PreUpdate(T state) { }4041        /// <summary>42        /// Performs a post-update treatment.43        /// </summary>44        /// <param name="state">The state to use.</param> + 845        protected virtual void PostUpdate(T state) { }4647        #endregion4849        #region ISystem5051        /// <summary>52        /// Gets or sets whether the current <see cref="ASystem{T}"/> instance should update or not.53        /// </summary> + 3254        public virtual bool IsEnabled { get; set; }  5556        #region ISystem5758        /// <summary>59        /// Gets or sets whether the current <see cref="ASystem{T}"/> instance should update or not.60        /// </summary> - 3261        public virtual bool IsEnabled { get; set; }6263        /// <summary>64        /// Updates the system once.65        /// </summary>66        /// <param name="state">The state to use.</param>67        public void Update(T state)68        { - 1169            if (IsEnabled)70            { - 871                CurrentState = state;72 - 873                PreUpdate(CurrentState);74 - 875                _runner.Update(this);76 - 877                PostUpdate(CurrentState);78            } - 1179        }8081        #endregion56        /// <summary>57        /// Updates the system once.58        /// </summary>59        /// <param name="state">The state to use.</param>60        public void Update(T state)61        { + 1162            if (IsEnabled)63            { + 864                CurrentState = state;65 + 866                PreUpdate(CurrentState);67 + 868                _runner.Update(this);69 + 870                PostUpdate(CurrentState);71            } + 1172        }7374        #endregion7576        #region IDisposable7778        /// <summary>79        /// Does nothing.80        /// </summary>81        public abstract void Dispose();  8283        #region IDisposable8485        /// <summary>86        /// Does nothing.87        /// </summary>88        public abstract void Dispose();8990        #endregion91    }92}83        #endregion84    }85} -

+
diff --git a/docs/coverage/DefaultEcs_ActionSystem_1.htm b/docs/coverage/DefaultEcs_ActionSystem_1.htm index 4154bb42..e80a36d4 100644 --- a/docs/coverage/DefaultEcs_ActionSystem_1.htm +++ b/docs/coverage/DefaultEcs_ActionSystem_1.htm @@ -106,7 +106,7 @@

D:\Projects\Def  63} - +

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ArrayExtension.htm b/docs/coverage/DefaultEcs_ArrayExtension.htm index 64415775..8f65929d 100644 --- a/docs/coverage/DefaultEcs_ArrayExtension.htm +++ b/docs/coverage/DefaultEcs_ArrayExtension.htm @@ -52,49 +52,49 @@

D:\P  8        [MethodImpl(MethodImplOptions.NoInlining)]  9        private static void InnerEnsureLength<T>(ref T[] array, int index, int maxLength)  10        { - 119211            int newLength = Math.Max(1, array.Length); + 134811            int newLength = Math.Max(1, array.Length);  12            do  13            { - 123814                newLength *= 2; + 142114                newLength *= 2;  15            } - 123816            while (index >= newLength); - 119217            Array.Resize(ref array, Math.Min(maxLength, newLength)); - 119218        } + 142116            while (index >= newLength); + 134817            Array.Resize(ref array, Math.Min(maxLength, newLength)); + 134818        }  19  20        [MethodImpl(MethodImplOptions.AggressiveInlining)]  21        public static void Fill<T>(this T[] array, in T value, int start = 0)  22        { - 221623            for (int i = start; i < array.Length; ++i) + 241223            for (int i = start; i < array.Length; ++i)  24            { - 72625                array[i] = value; + 78025                array[i] = value;  26            } - 38227        } + 42627        }  28  29        [MethodImpl(MethodImplOptions.AggressiveInlining)]  30        public static void EnsureLength<T>(ref T[] array, int index, int maxLength = int.MaxValue)  31        { - 10297132            if (index >= array.Length) + 10334232            if (index >= array.Length)  33            { - 84634                InnerEnsureLength(ref array, index, maxLength); + 95834                InnerEnsureLength(ref array, index, maxLength);  35            } - 10297136        } + 10334236        }  37  38        [MethodImpl(MethodImplOptions.AggressiveInlining)]  39        public static void EnsureLength<T>(ref T[] array, int index, int maxLength, in T defaultValue)  40        { - 52441            if (index >= array.Length) + 57941            if (index >= array.Length)  42            { - 34643                int oldLength = array.Length; + 39043                int oldLength = array.Length;  44 - 34645                InnerEnsureLength(ref array, index, maxLength); - 34646                array.Fill(defaultValue, oldLength); + 39045                InnerEnsureLength(ref array, index, maxLength); + 39046                array.Fill(defaultValue, oldLength);  47            } - 52448        } + 57948        }  49    }  50} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_BinarySerializer.htm b/docs/coverage/DefaultEcs_BinarySerializer.htm index 7f278c6b..c8bcd844 100644 --- a/docs/coverage/DefaultEcs_BinarySerializer.htm +++ b/docs/coverage/DefaultEcs_BinarySerializer.htm @@ -80,9 +80,9 @@

D:\P  27        {  28            #region IOperation  29 - 130            public void SetMaximumComponentCount(World world, int maxComponentCount) => world.SetMaximumComponentCount<T + 230            public void SetMaximumComponentCount(World world, int maxComponentCount) => world.SetMaximumComponentCount<T  31 - 4032            public void SetComponent(in Entity entity, Stream stream, byte[] buffer, byte* bufferP) => entity.Set(Conver + 4232            public void SetComponent(in Entity entity, Stream stream, byte[] buffer, byte* bufferP) => entity.Set(Conver  33  434            public void SetSameAsComponent(in Entity entity, in Entity reference) => entity.SetSameAs<T>(reference);  35 @@ -126,23 +126,23 @@

D:\P  273                        Dictionary<ushort, IOperation> operations = new Dictionary<ushort, IOperation>();  74  75                        int entryType; - 9776                        while ((entryType = stream.ReadByte()) >= 0) + 10276                        while ((entryType = stream.ReadByte()) >= 0)  77                        { - 9578                            switch ((EntryType)entryType) + 10078                            switch ((EntryType)entryType)  79                            {  80                                case EntryType.ComponentType: - 3881                                    stream.Read(buffer, 0, sizeof(ushort)); - 3882                                    operations.Add( - 3883                                        *(ushort*)bufferP, - 3884                                        _operations.GetOrAdd( - 3885                                            Type.GetType(Converter<string>.Read(stream, buffer, bufferP), true), - 5786                                            t => (IOperation)Activator.CreateInstance(typeof(Operation<>).MakeGenericTyp - 3887                                    break; + 4081                                    stream.Read(buffer, 0, sizeof(ushort)); + 4082                                    operations.Add( + 4083                                        *(ushort*)bufferP, + 4084                                        _operations.GetOrAdd( + 4085                                            Type.GetType(Converter<string>.Read(stream, buffer, bufferP), true), + 6086                                            t => (IOperation)Activator.CreateInstance(typeof(Operation<>).MakeGenericTyp + 4087                                    break;  88  89                                case EntryType.MaxComponentCount: - 190                                    stream.Read(buffer, 0, sizeof(ushort) + sizeof(int)); - 191                                    operations[*(ushort*)bufferP].SetMaximumComponentCount(world, *(int*)((ushort*)buffe - 192                                    break; + 290                                    stream.Read(buffer, 0, sizeof(ushort) + sizeof(int)); + 291                                    operations[*(ushort*)bufferP].SetMaximumComponentCount(world, *(int*)((ushort*)buffe + 292                                    break;  93  94                                case EntryType.Entity:  495                                    currentEntity = world.CreateEntity(); @@ -150,9 +150,9 @@

D:\P  497                                    break;  98  99                                case EntryType.Component: - 40100                                    stream.Read(buffer, 0, sizeof(ushort)); - 40101                                    operations[*(ushort*)bufferP].SetComponent(currentEntity, stream, buffer, bufferP); - 40102                                    break; + 42100                                    stream.Read(buffer, 0, sizeof(ushort)); + 42101                                    operations[*(ushort*)bufferP].SetComponent(currentEntity, stream, buffer, bufferP); + 42102                                    break;  103  104                                case EntryType.ComponentSameAs:  4105                                    stream.Read(buffer, 0, sizeof(ushort) + sizeof(int)); @@ -325,7 +325,7 @@

D:\P  272} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ChildParentOffsetCommand.htm b/docs/coverage/DefaultEcs_ChildParentOffsetCommand.htm index 727e46c1..e1ee411e 100644 --- a/docs/coverage/DefaultEcs_ChildParentOffsetCommand.htm +++ b/docs/coverage/DefaultEcs_ChildParentOffsetCommand.htm @@ -140,7 +140,7 @@

D:\Projec  100} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentAddedMessage_1.htm b/docs/coverage/DefaultEcs_ComponentAddedMessage_1.htm index 2fa76d70..9ebf77de 100644 --- a/docs/coverage/DefaultEcs_ComponentAddedMessage_1.htm +++ b/docs/coverage/DefaultEcs_ComponentAddedMessage_1.htm @@ -47,14 +47,14 @@

 7  8        public ComponentAddedMessage(int entityId, ComponentEnum components)  9        { - 35310            EntityId = entityId; - 35311            Components = components; - 35312        } + 40110            EntityId = entityId; + 40111            Components = components; + 40112        }  13    }  14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentAttribute.htm b/docs/coverage/DefaultEcs_ComponentAttribute.htm index 9ff01cbe..e5541a14 100644 --- a/docs/coverage/DefaultEcs_ComponentAttribute.htm +++ b/docs/coverage/DefaultEcs_ComponentAttribute.htm @@ -270,7 +270,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentChangedMessage_1.htm b/docs/coverage/DefaultEcs_ComponentChangedMessage_1.htm index a4cdf46c..e15fe05c 100644 --- a/docs/coverage/DefaultEcs_ComponentChangedMessage_1.htm +++ b/docs/coverage/DefaultEcs_ComponentChangedMessage_1.htm @@ -47,14 +47,14 @@

 7  8        public ComponentChangedMessage(int entityId, ComponentEnum components)  9        { - 3210            EntityId = entityId; - 3211            Components = components; - 3212        } + 3510            EntityId = entityId; + 3511            Components = components; + 3512        }  13    }  14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentCommands.htm b/docs/coverage/DefaultEcs_ComponentCommands.htm index b0c7f1c2..8f1736fe 100644 --- a/docs/coverage/DefaultEcs_ComponentCommands.htm +++ b/docs/coverage/DefaultEcs_ComponentCommands.htm @@ -156,7 +156,7 @@

 107} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentEnum.htm b/docs/coverage/DefaultEcs_ComponentEnum.htm index db6f1bf9..2425690b 100644 --- a/docs/coverage/DefaultEcs_ComponentEnum.htm +++ b/docs/coverage/DefaultEcs_ComponentEnum.htm @@ -23,8 +23,8 @@

< Summary

Total lines:109 Line coverage:100% (32 of 32) Covered branches:42 -Total branches:46 -Branch coverage:91.3% (42 of 46) +Total branches:44 +Branch coverage:95.4% (42 of 44)

Metrics

@@ -34,7 +34,7 @@

Metrics

Contains(...)120100%91.66% DoNotContains(...)120100%91.66% Copy()20100%100% -Clear()20100%50% +Clear()10100%100% ToString()60100%100% @@ -64,26 +64,26 @@

D:\Projects  19        public bool this[ComponentFlag flag]  20        {  21            [MethodImpl(MethodImplOptions.AggressiveInlining)] - 10076022            get => flag.Index < _bitArray?.Length && (_bitArray[flag.Index] & flag.Bit) != 0; + 10082222            get => flag.Index < _bitArray?.Length && (_bitArray[flag.Index] & flag.Bit) != 0;  23            [MethodImpl(MethodImplOptions.AggressiveInlining)]  24            set  25            { - 20103526                if ((_bitArray?.Length ?? 0) < flag.Index + 1) + 20109026                if ((_bitArray?.Length ?? 0) < flag.Index + 1)  27                { - 10029828                    uint[] newBitArray = new uint[flag.Index + 1]; - 10029829                    _bitArray?.CopyTo(newBitArray, 0); - 10029830                    _bitArray = newBitArray; + 10030328                    uint[] newBitArray = new uint[flag.Index + 1]; + 10030329                    _bitArray?.CopyTo(newBitArray, 0); + 10030330                    _bitArray = newBitArray;  31                }  32 - 20103533                if (value) + 20109033                if (value)  34                { - 20096735                    _bitArray[flag.Index] |= flag.Bit; - 20096736                } + 20102035                    _bitArray[flag.Index] |= flag.Bit; + 20102036                }  37                else  38                { - 6839                    _bitArray[flag.Index] &= ~flag.Bit; + 7039                    _bitArray[flag.Index] &= ~flag.Bit;  40                } - 6841            } + 7041            }  42        }  43  44        #endregion @@ -93,20 +93,20 @@

D:\Projects  48        [MethodImpl(MethodImplOptions.AggressiveInlining)]  49        public bool Contains(ComponentEnum filter)  50        { - 15551            if (filter._bitArray != null) + 15851            if (filter._bitArray != null)  52            { - 56653                for (int i = 0; i < filter._bitArray.Length; ++i) + 58053                for (int i = 0; i < filter._bitArray.Length; ++i)  54                { - 15555                    uint part = filter._bitArray[i]; - 15556                    if (part != 0 - 15557                        && (i >= _bitArray?.Length || (_bitArray[i] & part) != part)) + 15855                    uint part = filter._bitArray[i]; + 15856                    if (part != 0 + 15857                        && (i >= _bitArray?.Length || (_bitArray[i] & part) != part))  58                    { - 2759                        return false; + 2659                        return false;  60                    }  61                }  62            }  63 - 12864            return true; + 13264            return true;  65        }  66  67        [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -139,7 +139,7 @@

D:\Projects  94        }  95  96        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 3297        public void Clear() => _bitArray?.Fill(0u); + 3297        public void Clear() => _bitArray.Fill(0u);  98  99        public override unsafe string ToString()  100        { @@ -154,7 +154,7 @@

D:\Projects  109} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentFlag.htm b/docs/coverage/DefaultEcs_ComponentFlag.htm index 10f8af70..40482be0 100644 --- a/docs/coverage/DefaultEcs_ComponentFlag.htm +++ b/docs/coverage/DefaultEcs_ComponentFlag.htm @@ -22,9 +22,9 @@

< Summary

Coverable lines:11 Total lines:48 Line coverage:100% (11 of 11) -Covered branches:1 +Covered branches:2 Total branches:2 -Branch coverage:50% (1 of 2) +Branch coverage:100% (2 of 2)

Metrics

@@ -33,7 +33,7 @@

Metrics

.cctor()10100%100% .ctor(...)10100%100% -GetNextFlag()20100%50% +GetNextFlag()20100%100%

File(s)

@@ -67,9 +67,9 @@

D:\Projects  24  25        private ComponentFlag(int index, uint bit)  26        { - 2827            Index = index; - 2828            Bit = bit; - 2829        } + 4727            Index = index; + 4728            Bit = bit; + 4729        }  30  31        #endregion  32 @@ -77,21 +77,21 @@

D:\Projects  34  35        public static ComponentFlag GetNextFlag()  36        { - 2737            lock (_lockObject) + 4637            lock (_lockObject)  38            { - 2739                ComponentFlag flag = _lastFlag; - 2740                _lastFlag = _lastFlag.Bit != 0x8000_0000 ? new ComponentFlag(_lastFlag.Index, _lastFlag.Bit << 1) : new  + 4639                ComponentFlag flag = _lastFlag; + 4640                _lastFlag = _lastFlag.Bit != 0x8000_0000 ? new ComponentFlag(_lastFlag.Index, _lastFlag.Bit << 1) : new   41 - 2742                return flag; + 4642                return flag;  43            } - 2744        } + 4644        }  45  46        #endregion  47    }  48} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentLink.htm b/docs/coverage/DefaultEcs_ComponentLink.htm index 71dc91a4..ba4c21d6 100644 --- a/docs/coverage/DefaultEcs_ComponentLink.htm +++ b/docs/coverage/DefaultEcs_ComponentLink.htm @@ -53,16 +53,16 @@

D:\Projects  13  14        public ComponentLink(int entityId)  15        { - 33016            EntityId = entityId; - 33017            ReferenceCount = 1; - 33018        } + 37816            EntityId = entityId; + 37817            ReferenceCount = 1; + 37818        }  19  20        #endregion  21    }  22} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentManager_1.htm b/docs/coverage/DefaultEcs_ComponentManager_1.htm index f8175a23..3eb8a226 100644 --- a/docs/coverage/DefaultEcs_ComponentManager_1.htm +++ b/docs/coverage/DefaultEcs_ComponentManager_1.htm @@ -66,14 +66,14 @@

D:\Proje  20  21        static ComponentManager()  22        { - 2523            _lockObject = new object(); + 4423            _lockObject = new object();  24 - 2525            Flag = ComponentFlag.GetNextFlag(); + 4425            Flag = ComponentFlag.GetNextFlag();  26 - 2527            Pools = EmptyArray<ComponentPool<T>>.Value; + 4427            Pools = EmptyArray<ComponentPool<T>>.Value;  28 - 2529            Publisher<WorldDisposedMessage>.Subscribe(0, On); - 2530        } + 4429            Publisher<WorldDisposedMessage>.Subscribe(0, On); + 4430        }  31  32        #endregion  33 @@ -81,14 +81,14 @@

D:\Proje  35  36        private static void On(in WorldDisposedMessage message)  37        { - 140638            lock (_lockObject) + 281438            lock (_lockObject)  39            { - 140640                if (message.WorldId < Pools.Length) + 281440                if (message.WorldId < Pools.Length)  41                { - 125142                    Pools[message.WorldId] = null; + 224842                    Pools[message.WorldId] = null;  43                } - 140644            } - 140645        } + 281444            } + 281445        }  46  47        #endregion  48 @@ -97,35 +97,35 @@

D:\Proje  51        [MethodImpl(MethodImplOptions.NoInlining)]  52        private static ComponentPool<T> Add(int worldId, int maxEntityCount, int maxComponentCount)  53        { - 25154            lock (_lockObject) + 29554            lock (_lockObject)  55            { - 25156                ArrayExtension.EnsureLength(ref Pools, worldId); + 29556                ArrayExtension.EnsureLength(ref Pools, worldId);  57 - 25158                ref ComponentPool<T> pool = ref Pools[worldId]; - 25159                if (pool == null) + 29558                ref ComponentPool<T> pool = ref Pools[worldId]; + 29559                if (pool == null)  60                { - 25161                    pool = new ComponentPool<T>(worldId, maxEntityCount, maxComponentCount); + 29561                    pool = new ComponentPool<T>(worldId, maxEntityCount, maxComponentCount);  62                }  63 - 25164                return pool; + 29564                return pool;  65            } - 25166        } + 29566        }  67  68        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 47569        public static ComponentPool<T> Get(int worldId) => worldId < Pools.Length ? Pools[worldId] : null; + 53269        public static ComponentPool<T> Get(int worldId) => worldId < Pools.Length ? Pools[worldId] : null;  70  71        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 3172        public static ComponentPool<T> GetOrCreate(int worldId, int maxComponentCount) => Get(worldId) ?? Add(worldId, W + 3472        public static ComponentPool<T> GetOrCreate(int worldId, int maxComponentCount) => Get(worldId) ?? Add(worldId, W  73  74        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 37375        public static ComponentPool<T> GetOrCreate(int worldId) => Get(worldId) ?? Add(worldId, World.Infos[worldId].Max + 42475        public static ComponentPool<T> GetOrCreate(int worldId) => Get(worldId) ?? Add(worldId, World.Infos[worldId].Max  76  77        #endregion  78    }  79} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentPool_1.htm b/docs/coverage/DefaultEcs_ComponentPool_1.htm index 7d17cffa..cad8db1d 100644 --- a/docs/coverage/DefaultEcs_ComponentPool_1.htm +++ b/docs/coverage/DefaultEcs_ComponentPool_1.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.Technical.ComponentPool`1 Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\Technical\ComponentPool.cs -Covered lines:95 -Uncovered lines:10 +Covered lines:97 +Uncovered lines:8 Coverable lines:105 Total lines:270 -Line coverage:90.4% (95 of 105) -Covered branches:52 +Line coverage:92.3% (97 of 105) +Covered branches:54 Total branches:62 -Branch coverage:83.8% (52 of 62) +Branch coverage:87% (54 of 62)

Metrics

@@ -40,7 +40,7 @@

Metrics

On(...)40100%100% ThrowMaxNumberOfComponentReached()10100%100% Has(...)20100%100% -Set(...)12090.47%83.33% +Set(...)120100%100% SetSameAs(...)6071.42%50% Remove(...)26087.09%80.76% Get(...)10100%100% @@ -81,7 +81,7 @@

D:\Projects  27  28        #region Properties  29 - 106630        public int MaxComponentCount { get; } + 121530        public int MaxComponentCount { get; }  31  232        public bool IsNotEmpty => _lastComponentIndex > -1;  33 @@ -91,42 +91,42 @@

D:\Projects  37  38        static ComponentPool()  39        { - 2540            TypeInfo typeInfo = typeof(T).GetTypeInfo(); + 4440            TypeInfo typeInfo = typeof(T).GetTypeInfo();  41 - 2542            _isReferenceType = !typeInfo.IsValueType; - 2543            _isFlagType = typeInfo.IsFlagType(); - 2544            _isManagedResourceType = typeInfo.GenericTypeArguments.Length > 0 && typeInfo.GetGenericTypeDefinition() ==  - 2545        } + 4442            _isReferenceType = !typeInfo.IsValueType; + 4443            _isFlagType = typeInfo.IsFlagType(); + 4444            _isManagedResourceType = typeInfo.GenericTypeArguments.Length > 0 && typeInfo.GetGenericTypeDefinition() ==  + 4445        }  46 - 25147        public ComponentPool(int worldId, int maxEntityCount, int maxComponentCount) + 29547        public ComponentPool(int worldId, int maxEntityCount, int maxComponentCount)  48        { - 25149            _worldId = worldId; - 25150            _maxEntityCount = maxEntityCount; - 25151            MaxComponentCount = _isFlagType ? 1 : Math.Min(maxEntityCount, maxComponentCount); + 29549            _worldId = worldId; + 29550            _maxEntityCount = maxEntityCount; + 29551            MaxComponentCount = _isFlagType ? 1 : Math.Min(maxEntityCount, maxComponentCount);  52 - 25153            _mapping = EmptyArray<int>.Value; - 25154            _links = EmptyArray<ComponentLink>.Value; - 25155            _components = EmptyArray<T>.Value; - 25156            _lastComponentIndex = -1; + 29553            _mapping = EmptyArray<int>.Value; + 29554            _links = EmptyArray<ComponentLink>.Value; + 29555            _components = EmptyArray<T>.Value; + 29556            _lastComponentIndex = -1;  57 - 25158            Publisher<ComponentTypeReadMessage>.Subscribe(_worldId, On); - 25159            Publisher<EntityDisposedMessage>.Subscribe(_worldId, On); - 25160            Publisher<EntityCopyMessage>.Subscribe(_worldId, On); - 25161            Publisher<ComponentReadMessage>.Subscribe(_worldId, On); + 29558            Publisher<ComponentTypeReadMessage>.Subscribe(_worldId, On); + 29559            Publisher<EntityDisposedMessage>.Subscribe(_worldId, On); + 29560            Publisher<EntityCopyMessage>.Subscribe(_worldId, On); + 29561            Publisher<ComponentReadMessage>.Subscribe(_worldId, On);  62 - 25163            if (_isManagedResourceType) + 29563            if (_isManagedResourceType)  64            {  465                Publisher<ManagedResourceReleaseAllMessage>.Subscribe(_worldId, On);  66            } - 25167        } + 29567        }  68  69        #endregion  70  71        #region Callbacks  72 - 4073        private void On(in ComponentTypeReadMessage message) => message.Reader.OnRead<T>(MaxComponentCount); + 4273        private void On(in ComponentTypeReadMessage message) => message.Reader.OnRead<T>(MaxComponentCount);  74 - 16075        private void On(in EntityDisposedMessage message) => Remove(message.EntityId); + 17075        private void On(in EntityDisposedMessage message) => Remove(message.EntityId);  76  77        private void On(in EntityCopyMessage message)  78        { @@ -138,12 +138,12 @@

D:\Projects  84  85        private void On(in ComponentReadMessage message)  86        { - 23087            int componentIndex = message.EntityId < _mapping.Length ? _mapping[message.EntityId] : -1; - 23088            if (componentIndex != -1) + 24287            int componentIndex = message.EntityId < _mapping.Length ? _mapping[message.EntityId] : -1; + 24288            if (componentIndex != -1)  89            { - 9890                message.Reader.OnRead(ref _components[componentIndex], new Entity(_worldId, _links[componentIndex].Entit + 10290                message.Reader.OnRead(ref _components[componentIndex], new Entity(_worldId, _links[componentIndex].Entit  91            } - 23092        } + 24292        }  93  94        private void On(in ManagedResourceReleaseAllMessage message)  95        { @@ -164,32 +164,32 @@

D:\Projects  2110        private void ThrowMaxNumberOfComponentReached() => throw new InvalidOperationException($"Max number of component  111  112        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 70113        public bool Has(int entityId) => entityId < _mapping.Length && _mapping[entityId] != -1; + 76113        public bool Has(int entityId) => entityId < _mapping.Length && _mapping[entityId] != -1;  114  115        [MethodImpl(MethodImplOptions.AggressiveInlining)]  116        public bool Set(int entityId, in T component)  117        { - 365118            ArrayExtension.EnsureLength(ref _mapping, entityId, _maxEntityCount, -1); + 416118            ArrayExtension.EnsureLength(ref _mapping, entityId, _maxEntityCount, -1);  119 - 365120            ref int componentIndex = ref _mapping[entityId]; - 365121            if (componentIndex != -1) + 416120            ref int componentIndex = ref _mapping[entityId]; + 416121            if (componentIndex != -1)  122            { - 32123                if (_isManagedResourceType) + 35123                if (_isManagedResourceType)  124                { - 0125                    Publisher.Publish(_worldId, new ManagedResourceReleaseMessage<T>(_components[componentIndex])); + 1125                    Publisher.Publish(_worldId, new ManagedResourceReleaseMessage<T>(_components[componentIndex]));  126                }  127 - 32128                _components[componentIndex] = component; + 35128                _components[componentIndex] = component;  129 - 32130                if (_isManagedResourceType) + 35130                if (_isManagedResourceType)  131                { - 0132                    Publisher.Publish(_worldId, new ManagedResourceRequestMessage<T>(new Entity(_worldId, entityId), com + 1132                    Publisher.Publish(_worldId, new ManagedResourceRequestMessage<T>(new Entity(_worldId, entityId), com  133                }  134 - 32135                return false; + 35135                return false;  136            }  137 - 333138            if (_lastComponentIndex == MaxComponentCount - 1) + 381138            if (_lastComponentIndex == MaxComponentCount - 1)  139            {  3140                if (_isFlagType)  141                { @@ -199,20 +199,20 @@

D:\Projects  2145                ThrowMaxNumberOfComponentReached();  146            }  147 - 330148            componentIndex = ++_lastComponentIndex; + 378148            componentIndex = ++_lastComponentIndex;  149 - 330150            ArrayExtension.EnsureLength(ref _components, _lastComponentIndex, MaxComponentCount); - 330151            ArrayExtension.EnsureLength(ref _links, _lastComponentIndex, MaxComponentCount); + 378150            ArrayExtension.EnsureLength(ref _components, _lastComponentIndex, MaxComponentCount); + 378151            ArrayExtension.EnsureLength(ref _links, _lastComponentIndex, MaxComponentCount);  152 - 330153            _components[_lastComponentIndex] = component; - 330154            _links[_lastComponentIndex] = new ComponentLink(entityId); + 378153            _components[_lastComponentIndex] = component; + 378154            _links[_lastComponentIndex] = new ComponentLink(entityId);  155 - 330156            if (_isManagedResourceType) + 378156            if (_isManagedResourceType)  157            {  5158                Publisher.Publish(_worldId, new ManagedResourceRequestMessage<T>(new Entity(_worldId, entityId), compone  159            }  160 - 330161            return true; + 378161            return true;  162        }  163  164        [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -249,34 +249,34 @@

D:\Projects  195        [MethodImpl(MethodImplOptions.AggressiveInlining)]  196        public bool Remove(int entityId)  197        { - 191198            if (entityId >= _mapping.Length) + 203198            if (entityId >= _mapping.Length)  199            {  0200                return false;  201            }  202 - 191203            ref int componentIndex = ref _mapping[entityId]; - 191204            if (componentIndex == -1) + 203203            ref int componentIndex = ref _mapping[entityId]; + 203204            if (componentIndex == -1)  205            { - 73206                return false; + 77206                return false;  207            }  208 - 118209            if (_isManagedResourceType) + 126209            if (_isManagedResourceType)  210            {  2211                Publisher.Publish(_worldId, new ManagedResourceReleaseMessage<T>(_components[componentIndex]));  212            }  213 - 118214            ref ComponentLink link = ref _links[componentIndex]; - 118215            if (--link.ReferenceCount == 0) + 126214            ref ComponentLink link = ref _links[componentIndex]; + 126215            if (--link.ReferenceCount == 0)  216            { - 102217                if (componentIndex != _lastComponentIndex) + 110217                if (componentIndex != _lastComponentIndex)  218                { - 24219                    ComponentLink lastLink = _links[_lastComponentIndex]; - 24220                    _links[componentIndex] = lastLink; - 24221                    _components[componentIndex] = _components[_lastComponentIndex]; - 24222                    if (lastLink.ReferenceCount == 1) + 25219                    ComponentLink lastLink = _links[_lastComponentIndex]; + 25220                    _links[componentIndex] = lastLink; + 25221                    _components[componentIndex] = _components[_lastComponentIndex]; + 25222                    if (lastLink.ReferenceCount == 1)  223                    { - 24224                        _mapping[lastLink.EntityId] = componentIndex; - 24225                    } + 25224                        _mapping[lastLink.EntityId] = componentIndex; + 25225                    }  226                    else  227                    {  0228                        for (int i = 0; i < _mapping.Length; ++i) @@ -289,12 +289,12 @@

D:\Projects  235                    }  236                }  237 - 102238                if (_isReferenceType) + 110238                if (_isReferenceType)  239                { - 16240                    _components[_lastComponentIndex] = default; + 18240                    _components[_lastComponentIndex] = default;  241                } - 102242                --_lastComponentIndex; - 102243            } + 110242                --_lastComponentIndex; + 110243            }  16244            else if (link.EntityId == entityId)  245            {  15246                int linkIndex = componentIndex; @@ -308,13 +308,13 @@

D:\Projects  254                }  255            }  256 - 118257            componentIndex = -1; + 126257            componentIndex = -1;  258 - 118259            return true; + 126259            return true;  260        }  261  262        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 279263        public ref T Get(int entityId) => ref _components[_mapping[entityId]]; + 284263        public ref T Get(int entityId) => ref _components[_mapping[entityId]];  264  265        [MethodImpl(MethodImplOptions.AggressiveInlining)]  8266        public Span<T> GetAll() => new Span<T>(_components, 0, _lastComponentIndex + 1); @@ -324,7 +324,7 @@

D:\Projects  270} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentReadMessage.htm b/docs/coverage/DefaultEcs_ComponentReadMessage.htm index 35df9cef..82575d9c 100644 --- a/docs/coverage/DefaultEcs_ComponentReadMessage.htm +++ b/docs/coverage/DefaultEcs_ComponentReadMessage.htm @@ -56,7 +56,7 @@

 16} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentRemovedMessage_1.htm b/docs/coverage/DefaultEcs_ComponentRemovedMessage_1.htm index 02633f36..c272dc52 100644 --- a/docs/coverage/DefaultEcs_ComponentRemovedMessage_1.htm +++ b/docs/coverage/DefaultEcs_ComponentRemovedMessage_1.htm @@ -47,14 +47,14 @@

 7  8        public ComponentRemovedMessage(int entityId, ComponentEnum components)  9        { - 5510            EntityId = entityId; - 5511            Components = components; - 5512        } + 5710            EntityId = entityId; + 5711            Components = components; + 5712        }  13    }  14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentTypeReadMessage.htm b/docs/coverage/DefaultEcs_ComponentTypeReadMessage.htm index ab1e5d45..192a301f 100644 --- a/docs/coverage/DefaultEcs_ComponentTypeReadMessage.htm +++ b/docs/coverage/DefaultEcs_ComponentTypeReadMessage.htm @@ -54,7 +54,7 @@

 14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentTypeWriter.htm b/docs/coverage/DefaultEcs_ComponentTypeWriter.htm index 1330932a..874f2e04 100644 --- a/docs/coverage/DefaultEcs_ComponentTypeWriter.htm +++ b/docs/coverage/DefaultEcs_ComponentTypeWriter.htm @@ -78,33 +78,33 @@

 36  37        void IComponentTypeReader.OnRead<T>(int maxComponentCount)  38        { - 1939            _types.Add(typeof(T), _currentType); + 2039            _types.Add(typeof(T), _currentType);  40 - 1941            *_bufferP = (byte)EntryType.ComponentType; - 1942            ushort* entryType = (ushort*)(_bufferP + 1); - 1943            *(entryType++) = _currentType; - 1944            _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort)); - 1945            Converter<string>.Write(typeof(T).AssemblyQualifiedName, _stream, _buffer, _bufferP); + 2041            *_bufferP = (byte)EntryType.ComponentType; + 2042            ushort* entryType = (ushort*)(_bufferP + 1); + 2043            *(entryType++) = _currentType; + 2044            _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort)); + 2045            Converter<string>.Write(typeof(T).AssemblyQualifiedName, _stream, _buffer, _bufferP);  46 - 1947            if (maxComponentCount != _maxEntityCount) + 2047            if (maxComponentCount != _maxEntityCount)  48            { - 149                *_bufferP = (byte)EntryType.MaxComponentCount; - 150                entryType = (ushort*)(_bufferP + 1); - 151                *(entryType++) = _currentType; - 152                *(int*)entryType = maxComponentCount; + 249                *_bufferP = (byte)EntryType.MaxComponentCount; + 250                entryType = (ushort*)(_bufferP + 1); + 251                *(entryType++) = _currentType; + 252                *(int*)entryType = maxComponentCount;  53 - 154                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort) + sizeof(int)); + 254                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort) + sizeof(int));  55            }  56 - 1957            ++_currentType; - 1958        } + 2057            ++_currentType; + 2058        }  59  60        #endregion  61    }  62} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ComponentTypeWriter2.htm b/docs/coverage/DefaultEcs_ComponentTypeWriter2.htm index 90d92bdb..34554f06 100644 --- a/docs/coverage/DefaultEcs_ComponentTypeWriter2.htm +++ b/docs/coverage/DefaultEcs_ComponentTypeWriter2.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.Technical.Serialization.TextSerializer.ComponentTypeWriter Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\Technical\Serialization\TextSerializer\ComponentTypeWriter.cs -Covered lines:13 -Uncovered lines:1 +Covered lines:14 +Uncovered lines:0 Coverable lines:14 Total lines:53 -Line coverage:92.8% (13 of 14) -Covered branches:3 +Line coverage:100% (14 of 14) +Covered branches:4 Total branches:4 -Branch coverage:75% (3 of 4) +Branch coverage:100% (4 of 4)

Metrics

@@ -32,7 +32,7 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage .ctor(...)10100%100% -DefaultEcs.Serialization.IComponentTypeReader.OnRead(...)4088.88%75% +DefaultEcs.Serialization.IComponentTypeReader.OnRead(...)40100%100%

File(s)

@@ -73,29 +73,29 @@

 31  32        void IComponentTypeReader.OnRead<T>(int maxComponentCount)  33        { - 1934            string shortName = typeof(T).Name; + 2034            string shortName = typeof(T).Name;  35 - 1936            int repeatCount = 1; - 1937            while (_types.ContainsValue(shortName)) + 2036            int repeatCount = 1; + 2137            while (_types.ContainsValue(shortName))  38            { - 039                shortName = $"{typeof(T).Name}_{repeatCount++}"; + 139                shortName = $"{typeof(T).Name}_{repeatCount++}";  40            }  41 - 1942            _types.Add(typeof(T), shortName); + 2042            _types.Add(typeof(T), shortName);  43 - 1944            _writer.WriteLine($"{nameof(EntryType.ComponentType)} {shortName} {typeof(T).FullName}, {typeof(T).GetTypeIn - 1945            if (maxComponentCount != _maxEntityCount) + 2044            _writer.WriteLine($"{nameof(EntryType.ComponentType)} {shortName} {typeof(T).FullName}, {typeof(T).GetTypeIn + 2045            if (maxComponentCount != _maxEntityCount)  46            { - 147                _writer.WriteLine($"{nameof(EntryType.MaxComponentCount)} {shortName} {maxComponentCount}"); + 247                _writer.WriteLine($"{nameof(EntryType.MaxComponentCount)} {shortName} {maxComponentCount}");  48            } - 1949        } + 2049        }  50  51        #endregion  52    }  53} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Converter.htm b/docs/coverage/DefaultEcs_Converter.htm index 1c2e85ea..d9587fa6 100644 --- a/docs/coverage/DefaultEcs_Converter.htm +++ b/docs/coverage/DefaultEcs_Converter.htm @@ -310,7 +310,7 @@

 267} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Converter2.htm b/docs/coverage/DefaultEcs_Converter2.htm index 99c77b06..17621fca 100644 --- a/docs/coverage/DefaultEcs_Converter2.htm +++ b/docs/coverage/DefaultEcs_Converter2.htm @@ -471,7 +471,7 @@

 427} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Converter_1.htm b/docs/coverage/DefaultEcs_Converter_1.htm index 3c5c8c1d..01b08b4e 100644 --- a/docs/coverage/DefaultEcs_Converter_1.htm +++ b/docs/coverage/DefaultEcs_Converter_1.htm @@ -140,15 +140,15 @@

 95  96        static Converter()  97        { - 2898            _type = typeof(T); - 2899            TypeInfo typeInfo = _type.GetTypeInfo(); + 2998            _type = typeof(T); + 2999            TypeInfo typeInfo = _type.GetTypeInfo();  100 - 28101            if (_type == typeof(string)) + 29101            if (_type == typeof(string))  102            {  1103                _writeAction = (Converter.WriteAction<T>)(Delegate)new Converter.WriteAction<string>(StringConverter.Wri  1104                _readAction = (Converter.ReadAction<T>)(Delegate)new Converter.ReadAction<string>(StringConverter.Read);  1105            } - 27106            else if (typeInfo.IsArray) + 28106            else if (typeInfo.IsArray)  107            {  2108                Type elementType = typeInfo.GetElementType();  109 @@ -159,13 +159,13 @@

 114            {  115                try  116                { - 25117                    if (typeInfo.IsUnmanaged()) + 26117                    if (typeInfo.IsUnmanaged())  118                    { - 17119                        TypeInfo unmanagedType = typeof(UnmanagedConverter<>).MakeGenericType(_type).GetTypeInfo(); + 18119                        TypeInfo unmanagedType = typeof(UnmanagedConverter<>).MakeGenericType(_type).GetTypeInfo();  120 - 17121                        _writeAction = (Converter.WriteAction<T>)unmanagedType.GetDeclaredMethod(nameof(UnmanagedConvert - 17122                        _readAction = (Converter.ReadAction<T>)unmanagedType.GetDeclaredMethod(nameof(UnmanagedConverter - 17123                    } + 18121                        _writeAction = (Converter.WriteAction<T>)unmanagedType.GetDeclaredMethod(nameof(UnmanagedConvert + 18122                        _readAction = (Converter.ReadAction<T>)unmanagedType.GetDeclaredMethod(nameof(UnmanagedConverter + 18123                    }  124                    else  125                    {  8126                        DynamicMethod writeMethod = new DynamicMethod($"Write_{nameof(T)}", typeof(void), new[] { _type. @@ -220,14 +220,14 @@

 8175                        readGenerator.Emit(OpCodes.Ret);  8176                        _readAction = (Converter.ReadAction<T>)readMethod.CreateDelegate(typeof(Converter.ReadAction<T>)  177                    } - 25178                } + 26178                }  0179                catch  180                {  0181                    _writeAction = (in T _, Stream __, byte[] ___, byte* ____) => throw new InvalidOperationException($"  0182                    _readAction = (_, __, ___) => throw new InvalidOperationException($"Unable to handle type {_type.Ful  0183                }  184            } - 25185        } + 26185        }  186  187        #endregion  188 @@ -274,15 +274,15 @@

 229  230        public static void Write(in T value, Stream stream, byte[] buffer, byte* bufferP)  231        { - 339232            if (value == default) + 343232            if (value == default)  233            {  8234                stream.WriteByte(0);  8235            } - 331236            else if (_type == value.GetType()) + 335236            else if (_type == value.GetType())  237            { - 328238                stream.WriteByte(1); - 328239                _writeAction(value, stream, buffer, bufferP); - 328240            } + 332238                stream.WriteByte(1); + 332239                _writeAction(value, stream, buffer, bufferP); + 332240            }  241            else  242            {  3243                stream.WriteByte(2); @@ -294,13 +294,13 @@

 249  250        public static T Read(Stream stream, byte[] buffer, byte* bufferP)  251        { - 339252            switch (stream.ReadByte()) + 343252            switch (stream.ReadByte())  253            {  254                case 0:  8255                    return default;  256  257                case 1: - 328258                    return _readAction(stream, buffer, bufferP); + 332258                    return _readAction(stream, buffer, bufferP);  259  260                default:  3261                    return Converter.GetReadAction<T>(StringConverter.Read(stream, buffer, bufferP))(stream, buffer, buf @@ -312,7 +312,7 @@

 267} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Converter_12.htm b/docs/coverage/DefaultEcs_Converter_12.htm index 4a3c8354..491d41a9 100644 --- a/docs/coverage/DefaultEcs_Converter_12.htm +++ b/docs/coverage/DefaultEcs_Converter_12.htm @@ -148,7 +148,7 @@

 96        private const string _arrayEnd = "]";  97  98        private static readonly bool _isValueType; - 3099        private static readonly char[] _split = new[] { ' ', '\t' }; + 3199        private static readonly char[] _split = new[] { ' ', '\t' };  100        private static readonly Dictionary<string, ReadFieldAction> _readFieldActions;  101        private static readonly Converter.WriteAction<T> _writeAction;  102        private static readonly Converter.ReadAction<T> _readAction; @@ -159,72 +159,72 @@

 107  108        static Converter()  109        { - 30110            TypeInfo typeInfo = typeof(T).GetTypeInfo(); + 31110            TypeInfo typeInfo = typeof(T).GetTypeInfo();  111 - 30112            _isValueType = typeInfo.IsValueType; + 31112            _isValueType = typeInfo.IsValueType;  113 - 30114            _readFieldActions = new Dictionary<string, ReadFieldAction>(); + 31114            _readFieldActions = new Dictionary<string, ReadFieldAction>();  115 - 326116            _writeAction = (in T v, StreamWriter w, int _) => w.WriteLine(v.ToString()); + 327116            _writeAction = (in T v, StreamWriter w, int _) => w.WriteLine(v.ToString());  117  118            #region clr types - 30119            if (typeof(T) == typeof(bool)) + 31119            if (typeof(T) == typeof(bool))  120            {  1121                _readAction = Converter.ConvertRead<T>(Converter<bool>.GetReadAction(bool.Parse));  1122            } - 29123            else if (typeof(T) == typeof(sbyte)) + 30123            else if (typeof(T) == typeof(sbyte))  124            {  1125                _readAction = Converter.ConvertRead<T>(Converter<sbyte>.GetReadAction(sbyte.Parse));  1126            } - 28127            else if (typeof(T) == typeof(byte)) + 29127            else if (typeof(T) == typeof(byte))  128            {  1129                _readAction = Converter.ConvertRead<T>(Converter<byte>.GetReadAction(byte.Parse));  1130            } - 27131            else if (typeof(T) == typeof(short)) + 28131            else if (typeof(T) == typeof(short))  132            {  1133                _readAction = Converter.ConvertRead<T>(Converter<short>.GetReadAction(short.Parse));  1134            } - 26135            else if (typeof(T) == typeof(ushort)) + 27135            else if (typeof(T) == typeof(ushort))  136            {  1137                _readAction = Converter.ConvertRead<T>(Converter<ushort>.GetReadAction(ushort.Parse));  1138            } - 25139            else if (typeof(T) == typeof(int)) + 26139            else if (typeof(T) == typeof(int))  140            {  1141                _readAction = Converter.ConvertRead<T>(Converter<int>.GetReadAction(int.Parse));  1142            } - 24143            else if (typeof(T) == typeof(uint)) + 25143            else if (typeof(T) == typeof(uint))  144            {  1145                _readAction = Converter.ConvertRead<T>(Converter<uint>.GetReadAction(uint.Parse));  1146            } - 23147            else if (typeof(T) == typeof(long)) + 24147            else if (typeof(T) == typeof(long))  148            {  1149                _readAction = Converter.ConvertRead<T>(Converter<long>.GetReadAction(long.Parse));  1150            } - 22151            else if (typeof(T) == typeof(ulong)) + 23151            else if (typeof(T) == typeof(ulong))  152            {  1153                _readAction = Converter.ConvertRead<T>(Converter<ulong>.GetReadAction(ulong.Parse));  1154            } - 21155            else if (typeof(T) == typeof(char)) + 22155            else if (typeof(T) == typeof(char))  156            {  1157                _readAction = Converter.ConvertRead<T>(Converter<char>.GetReadAction(CharParse));  1158            } - 20159            else if (typeof(T) == typeof(decimal)) + 21159            else if (typeof(T) == typeof(decimal))  160            {  1161                _readAction = Converter.ConvertRead<T>(Converter<decimal>.GetReadAction(decimal.Parse));  1162            } - 19163            else if (typeof(T) == typeof(double)) + 20163            else if (typeof(T) == typeof(double))  164            {  1165                _readAction = Converter.ConvertRead<T>(Converter<double>.GetReadAction(double.Parse));  1166            } - 18167            else if (typeof(T) == typeof(float)) + 19167            else if (typeof(T) == typeof(float))  168            {  1169                _readAction = Converter.ConvertRead<T>(Converter<float>.GetReadAction(float.Parse));  1170            } - 17171            else if (typeof(T) == typeof(string)) + 18171            else if (typeof(T) == typeof(string))  172            {  6173                _readAction = Converter.ConvertRead<T>(Converter<string>.GetReadAction(s => s));  1174            } - 16175            else if (typeInfo.IsEnum) + 17175            else if (typeInfo.IsEnum)  176            {  1177                ParameterExpression line = Expression.Parameter(typeof(string));  1178                ParameterExpression reader = Expression.Parameter(typeof(StreamReader)); @@ -236,7 +236,7 @@

 184  1185                _readAction = Expression.Lambda<Converter.ReadAction<T>>(Expression.Call(typeof(Converter<T>).GetTypeInf  1186            } - 15187            else if (typeInfo.IsArray) + 16187            else if (typeInfo.IsArray)  188            {  2189                Type elementType = typeInfo.GetElementType();  190 @@ -250,44 +250,44 @@

 198  199                bool Parameters_string(MethodInfo methodInfo)  200                { - 65201                    ParameterInfo[] parameters = methodInfo.GetParameters(); + 70201                    ParameterInfo[] parameters = methodInfo.GetParameters();  202 - 65203                    return parameters.Length == 1 - 65204                        && parameters[0].ParameterType == typeof(string); + 70203                    return parameters.Length == 1 + 70204                        && parameters[0].ParameterType == typeof(string);  205                }  206  207                bool Parameters_string_string(MethodInfo methodInfo)  208                { - 91209                    ParameterInfo[] parameters = methodInfo.GetParameters(); + 98209                    ParameterInfo[] parameters = methodInfo.GetParameters();  210 - 91211                    return parameters.Length == 2 - 91212                        && parameters[0].ParameterType == typeof(string) - 91213                        && parameters[1].ParameterType == typeof(string); + 98211                    return parameters.Length == 2 + 98212                        && parameters[0].ParameterType == typeof(string) + 98213                        && parameters[1].ParameterType == typeof(string);  214                }  215  216                #endregion  217 - 13218                MethodInfo write = typeof(StreamWriter).GetTypeInfo().GetDeclaredMethods(nameof(StreamWriter.Write)).Fir - 13219                MethodInfo writeLineString = typeof(Converter<T>).GetTypeInfo().GetDeclaredMethod(nameof(StreamWriterWri - 13220                MethodInfo stringConcat = typeof(string).GetTypeInfo().GetDeclaredMethods(nameof(string.Concat)).First(P + 14218                MethodInfo write = typeof(StreamWriter).GetTypeInfo().GetDeclaredMethods(nameof(StreamWriter.Write)).Fir + 14219                MethodInfo writeLineString = typeof(Converter<T>).GetTypeInfo().GetDeclaredMethod(nameof(StreamWriterWri + 14220                MethodInfo stringConcat = typeof(string).GetTypeInfo().GetDeclaredMethods(nameof(string.Concat)).First(P  221 - 13222                ParameterExpression value = Expression.Parameter(typeof(T).MakeByRefType()); - 13223                ParameterExpression writer = Expression.Parameter(typeof(StreamWriter)); - 13224                ParameterExpression indentation = Expression.Parameter(typeof(int)); + 14222                ParameterExpression value = Expression.Parameter(typeof(T).MakeByRefType()); + 14223                ParameterExpression writer = Expression.Parameter(typeof(StreamWriter)); + 14224                ParameterExpression indentation = Expression.Parameter(typeof(int));  225 - 13226                ParameterExpression space = Expression.Variable(typeof(string)); - 13227                Expression assignSpace = Expression.Assign(space, Expression.Call(typeof(Converter<T>).GetTypeInfo().Get + 14226                ParameterExpression space = Expression.Variable(typeof(string)); + 14227                Expression assignSpace = Expression.Assign(space, Expression.Call(typeof(Converter<T>).GetTypeInfo().Get  228 - 13229                List<Expression> writeExpressions = new List<Expression> - 13230                { - 13231                    Expression.Call(writeLineString, writer,Expression.Constant(_objectBegin)), - 13232                    Expression.PreIncrementAssign(indentation), - 13233                    assignSpace - 13234                }; + 14229                List<Expression> writeExpressions = new List<Expression> + 14230                { + 14231                    Expression.Call(writeLineString, writer,Expression.Constant(_objectBegin)), + 14232                    Expression.PreIncrementAssign(indentation), + 14233                    assignSpace + 14234                };  235 - 46236                while (typeInfo != null) + 50236                while (typeInfo != null)  237                { - 162238                    foreach (FieldInfo fieldInfo in typeInfo.DeclaredFields.Where(f => !f.IsStatic)) + 168238                    foreach (FieldInfo fieldInfo in typeInfo.DeclaredFields.Where(f => !f.IsStatic))  239                    {  32240                        string name = GetFriendlyName(fieldInfo.Name);  32241                        Expression writeField = Expression.Block( @@ -317,18 +317,18 @@

 32265                        _readFieldActions.Add(name.ToUpperInvariant(), (ReadFieldAction)readMethod.CreateDelegate(typeof  266                    }  267 - 33268                    typeInfo = typeInfo.BaseType?.GetTypeInfo(); + 36268                    typeInfo = typeInfo.BaseType?.GetTypeInfo();  269                }  270 - 13271                writeExpressions.Add(Expression.PreDecrementAssign(indentation)); - 13272                writeExpressions.Add(assignSpace); - 13273                writeExpressions.Add(Expression.Call(writeLineString, writer, Expression.Call(stringConcat, space, Expre + 14271                writeExpressions.Add(Expression.PreDecrementAssign(indentation)); + 14272                writeExpressions.Add(assignSpace); + 14273                writeExpressions.Add(Expression.Call(writeLineString, writer, Expression.Call(stringConcat, space, Expre  274 - 13275                _writeAction = Expression.Lambda<Converter.WriteAction<T>>(Expression.Block(new[] { space }, writeExpres + 14275                _writeAction = Expression.Lambda<Converter.WriteAction<T>>(Expression.Block(new[] { space }, writeExpres  276 - 13277                _readAction = ReadAnyType; + 14277                _readAction = ReadAnyType;  278            } - 13279        } + 14279        }  280  281        #endregion  282 @@ -358,20 +358,20 @@

 306  307        private static T ReadAnyType(string line, StreamReader reader)  308        { - 71309            while ((string.IsNullOrWhiteSpace(line) || line.Split(_split, StringSplitOptions.RemoveEmptyEntries)[0] != _ + 73309            while ((string.IsNullOrWhiteSpace(line) || line.Split(_split, StringSplitOptions.RemoveEmptyEntries)[0] != _  310            {  0311                line = reader.ReadLine();  312            }  313 - 71314            T value = _isValueType ? default : (T)ObjectInitializer.Create(typeof(T)); + 73314            T value = _isValueType ? default : (T)ObjectInitializer.Create(typeof(T));  315 - 303316            while (!reader.EndOfStream) + 305316            while (!reader.EndOfStream)  317            { - 303318                line = reader.ReadLine(); - 303319                string[] parts = line.Split(_split, 2, StringSplitOptions.RemoveEmptyEntries); - 303320                if (parts.Length > 0) + 305318                line = reader.ReadLine(); + 305319                string[] parts = line.Split(_split, 2, StringSplitOptions.RemoveEmptyEntries); + 305320                if (parts.Length > 0)  321                { - 303322                    if (parts[0] == _objectEnd) + 305322                    if (parts[0] == _objectEnd)  323                    {  324                        break;  325                    } @@ -382,7 +382,7 @@

 330                }  331            }  332 - 71333            return value; + 73333            return value;  334        }  335  336        private static T[] ReadArray(string line, StreamReader reader) @@ -416,9 +416,9 @@

 8364            return Enum.TryParse(entry, out TEnum value) ? value : throw new ArgumentException($"Unable to convert '{ent  365        }  366 - 150367        private static string CreateIndentation(int indentation) => string.Join(string.Empty, Enumerable.Repeat('\t', in + 154367        private static string CreateIndentation(int indentation) => string.Join(string.Empty, Enumerable.Repeat('\t', in  368 - 142369        private static void StreamWriterWriteLine(StreamWriter writer, string line) => writer.WriteLine(line); + 146369        private static void StreamWriterWriteLine(StreamWriter writer, string line) => writer.WriteLine(line);  370  371        private static void WriteArray(in T[] values, StreamWriter writer, int indentation)  372        { @@ -437,14 +437,14 @@

 385  386        public static void Write(in T value, StreamWriter writer, int indentation)  387        { - 382388            if (value == default) + 384388            if (value == default)  389            {  8390                writer.WriteLine("null");  8391            } - 374392            else if (typeof(T) == value.GetType()) + 376392            else if (typeof(T) == value.GetType())  393            { - 371394                _writeAction(value, writer, indentation); - 371395            } + 373394                _writeAction(value, writer, indentation); + 373395            }  396            else  397            {  3398                Type type = value.GetType(); @@ -455,22 +455,22 @@

 403  404        public static T Read(string line, StreamReader reader)  405        { - 400406            while (string.IsNullOrWhiteSpace(line) && !reader.EndOfStream) + 402406            while (string.IsNullOrWhiteSpace(line) && !reader.EndOfStream)  407            {  18408                line = reader.ReadLine();  409            }  410 - 382411            if (line?.StartsWith("null") ?? true) + 384411            if (line?.StartsWith("null") ?? true)  412            {  8413                return default;  414            } - 374415            else if (line.StartsWith("$type")) + 376415            else if (line.StartsWith("$type"))  416            {  3417                return Converter.GetReadAction<T>(Type.GetType(line.Split(_split, 2)[1], true))(string.Empty, reader);  418            }  419            else  420            { - 371421                return _readAction(line, reader); + 373421                return _readAction(line, reader);  422            }  423        }  424 @@ -479,7 +479,7 @@

 427} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EmptyArray_1.htm b/docs/coverage/DefaultEcs_EmptyArray_1.htm index 2049f97f..ef2b348d 100644 --- a/docs/coverage/DefaultEcs_EmptyArray_1.htm +++ b/docs/coverage/DefaultEcs_EmptyArray_1.htm @@ -42,13 +42,13 @@

D:\Proje  9#if NETSTANDARD1_1  10        public static T[] Value { get; } = new T[0];  11#else - 97712        public static T[] Value => Array.Empty<T>(); + 113012        public static T[] Value => Array.Empty<T>();  13#endif  14    }  15} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Entity.htm b/docs/coverage/DefaultEcs_Entity.htm index 05b536d8..a0b39aab 100644 --- a/docs/coverage/DefaultEcs_Entity.htm +++ b/docs/coverage/DefaultEcs_Entity.htm @@ -22,9 +22,9 @@

< Summary

Coverable lines:111 Total lines:415 Line coverage:96.3% (107 of 111) -Covered branches:81 +Covered branches:82 Total branches:104 -Branch coverage:77.8% (81 of 104) +Branch coverage:78.8% (82 of 104)

Metrics

@@ -40,7 +40,7 @@

Metrics

Disable()80100%75% Set(...)100100%100% SetSameAs(...)16076.92%62.5% -Remove()60100%83.33% +Remove()60100%100% Has()40100%75% Get()10100%100% SetAsChildOf(...)80100%100% @@ -92,16 +92,16 @@

D:\Projects\DefaultEcs\sour  28  29        internal Entity(int worldId, int entityId)  30        { - 20052531            WorldId = worldId; - 20052532            EntityId = entityId; - 20052533        } + 20053731            WorldId = worldId; + 20053732            EntityId = entityId; + 20053733        }  34  35        #endregion  36  37        #region Properties  38  39        [DebuggerBrowsable(DebuggerBrowsableState.Never)] - 61940        private ref ComponentEnum Components => ref World.Infos[WorldId].EntityInfos[EntityId].Components; + 67740        private ref ComponentEnum Components => ref World.Infos[WorldId].EntityInfos[EntityId].Components;  41  42        /// <summary>  43        /// Gets whether the current <see cref="Entity"/> is alive or not. @@ -151,15 +151,15 @@

D:\Projects\DefaultEcs\sour  87        /// <exception cref="InvalidOperationException"><see cref="Entity"/> was not created from a <see cref="World"/>.  88        public void Enable()  89        { - 390            if (WorldId == 0) Throw("Entity was not created from a World"); + 490            if (WorldId == 0) Throw("Entity was not created from a World");  91 - 392            ref ComponentEnum components = ref Components; - 393            if (!components[World.IsEnabledFlag]) + 492            ref ComponentEnum components = ref Components; + 493            if (!components[World.IsEnabledFlag])  94            { - 395                components[World.IsEnabledFlag] = true; - 396                Publisher.Publish(WorldId, new EntityEnabledMessage(EntityId, components)); + 495                components[World.IsEnabledFlag] = true; + 496                Publisher.Publish(WorldId, new EntityEnabledMessage(EntityId, components));  97            } - 398        } + 498        }  99  100        /// <summary>  101        /// Disables the current <see cref="Entity"/> so it does not appear in <see cref="EntitySet"/>. @@ -183,7 +183,7 @@

D:\Projects\DefaultEcs\sour  119        /// <typeparam name="T">The type of the component.</typeparam>  120        /// <returns>true if the <see cref="Entity"/> has a component of type <typeparamref name="T"/> enabled; otherwis  121        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 113122        public bool IsEnabled<T>() => WorldId == 0 ? false : Components[ComponentManager<T>.Flag]; + 117122        public bool IsEnabled<T>() => WorldId == 0 ? false : Components[ComponentManager<T>.Flag];  123  124        /// <summary>  125        /// Enables the current <see cref="Entity"/> component of type <typeparamref name="T"/> so it can appear in <see @@ -233,22 +233,22 @@

D:\Projects\DefaultEcs\sour  169        /// <exception cref="InvalidOperationException">Max number of component of type <typeparamref name="T"/> reached  170        public void Set<T>(in T component = default)  171        { - 357172            if (WorldId == 0) Throw("Entity was not created from a World"); + 408172            if (WorldId == 0) Throw("Entity was not created from a World");  173 - 355174            ref ComponentEnum components = ref Components; - 355175            if (ComponentManager<T>.GetOrCreate(WorldId).Set(EntityId, component)) + 406174            ref ComponentEnum components = ref Components; + 406175            if (ComponentManager<T>.GetOrCreate(WorldId).Set(EntityId, component))  176            { - 322177                components[ComponentManager<T>.Flag] = true; - 322178                if (components[World.IsEnabledFlag]) + 370177                components[ComponentManager<T>.Flag] = true; + 370178                if (components[World.IsEnabledFlag])  179                { - 314180                    Publisher.Publish(WorldId, new ComponentAddedMessage<T>(EntityId, components)); + 362180                    Publisher.Publish(WorldId, new ComponentAddedMessage<T>(EntityId, components));  181                } - 314182            } - 32183            else if (components[World.IsEnabledFlag] && components[ComponentManager<T>.Flag]) + 362182            } + 35183            else if (components[World.IsEnabledFlag] && components[ComponentManager<T>.Flag])  184            { - 32185                Publisher.Publish(WorldId, new ComponentChangedMessage<T>(EntityId, components)); + 35185                Publisher.Publish(WorldId, new ComponentChangedMessage<T>(EntityId, components));  186            } - 40187        } + 43187        }  188  189        /// <summary>  190        /// Sets the value of the component of type <typeparamref name="T"/> on the current <see cref="Entity"/> to the  @@ -286,16 +286,16 @@

D:\Projects\DefaultEcs\sour  222        /// <typeparam name="T">The type of the component.</typeparam>  223        public void Remove<T>()  224        { - 31225            if (ComponentManager<T>.Get(WorldId)?.Remove(EntityId) ?? false) + 34225            if (ComponentManager<T>.Get(WorldId)?.Remove(EntityId) ?? false)  226            { - 31227                ref ComponentEnum components = ref Components; - 31228                components[ComponentManager<T>.Flag] = false; - 31229                if (components[World.IsEnabledFlag]) + 33227                ref ComponentEnum components = ref Components; + 33228                components[ComponentManager<T>.Flag] = false; + 33229                if (components[World.IsEnabledFlag])  230                { - 31231                    Publisher.Publish(WorldId, new ComponentRemovedMessage<T>(EntityId, components)); + 33231                    Publisher.Publish(WorldId, new ComponentRemovedMessage<T>(EntityId, components));  232                }  233            } - 31234        } + 34234        }  235  236        /// <summary>  237        /// Returns whether the current <see cref="Entity"/> has a component of type <typeparamref name="T"/>. @@ -303,7 +303,7 @@

D:\Projects\DefaultEcs\sour  239        /// <typeparam name="T">The type of the component.</typeparam>  240        /// <returns>true if the <see cref="Entity"/> has a component of type <typeparamref name="T"/>; otherwise, false  241        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 36242        public bool Has<T>() => WorldId < ComponentManager<T>.Pools.Length && (ComponentManager<T>.Pools[WorldId]?.Has(E + 41242        public bool Has<T>() => WorldId < ComponentManager<T>.Pools.Length && (ComponentManager<T>.Pools[WorldId]?.Has(E  243  244        /// <summary>  245        /// Gets the component of type <typeparamref name="T"/> on the current <see cref="Entity"/>. @@ -312,7 +312,7 @@

D:\Projects\DefaultEcs\sour  248        /// <returns>A reference to the component.</returns>  249        /// <exception cref="Exception"><see cref="Entity"/> was not created from a <see cref="World"/> or does not have  250        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 275251        public ref T Get<T>() => ref ComponentManager<T>.Pools[WorldId].Get(EntityId); + 279251        public ref T Get<T>() => ref ComponentManager<T>.Pools[WorldId].Get(EntityId);  252  253        /// <summary>  254        /// Makes it so when given <see cref="Entity"/> is disposed, current <see cref="Entity"/> will also be disposed. @@ -446,7 +446,7 @@

D:\Projects\DefaultEcs\sour  382        /// </summary>  383        /// <param name="other">An object to compare with this object.</param>  384        /// <returns>true if the current object is equal to the other parameter; otherwise, false.</returns> - 209385        public bool Equals(Entity other) => EntityId == other.EntityId && WorldId == other.WorldId; + 221385        public bool Equals(Entity other) => EntityId == other.EntityId && WorldId == other.WorldId;  386  387        #endregion  388 @@ -460,13 +460,13 @@

D:\Projects\DefaultEcs\sour  396        /// true if obj and this instance are the same type and represent the same value;  397        /// otherwise, false.  398        /// </returns> - 151399        public override bool Equals(object obj) => obj is Entity entity && Equals(entity); + 161399        public override bool Equals(object obj) => obj is Entity entity && Equals(entity);  400  401        /// <summary>  402        /// Returns the hash code for this instance.  403        /// </summary>  404        /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns> - 192405        public override int GetHashCode() => EntityId; + 200405        public override int GetHashCode() => EntityId;  406  407        /// <summary>  408        /// Returns a string representation of this instance. @@ -479,7 +479,7 @@

D:\Projects\DefaultEcs\sour  415} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityCommand.htm b/docs/coverage/DefaultEcs_EntityCommand.htm index b2bdcff1..17288e2d 100644 --- a/docs/coverage/DefaultEcs_EntityCommand.htm +++ b/docs/coverage/DefaultEcs_EntityCommand.htm @@ -140,7 +140,7 @@

D:\Projec  100} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityCommandPlayer.htm b/docs/coverage/DefaultEcs_EntityCommandPlayer.htm index 16b48f06..bce0bd23 100644 --- a/docs/coverage/DefaultEcs_EntityCommandPlayer.htm +++ b/docs/coverage/DefaultEcs_EntityCommandPlayer.htm @@ -72,7 +72,7 @@

D:\Proj  31} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityCommandRecorder.htm b/docs/coverage/DefaultEcs_EntityCommandRecorder.htm index 800ef838..f203ba0d 100644 --- a/docs/coverage/DefaultEcs_EntityCommandRecorder.htm +++ b/docs/coverage/DefaultEcs_EntityCommandRecorder.htm @@ -79,7 +79,7 @@

D:\Pr  26        /// <summary>  27        /// Gets the maximum capacity the current instance can grow to.  28        /// </summary> - 4229        public int MaxCapacity { get; } + 4829        public int MaxCapacity { get; }  30  31        /// <summary>  32        /// Gets current capacity of the current instance. @@ -171,27 +171,27 @@

D:\Pr  118  119            do  120            { - 100082121                commandOffset = _nextCommandOffset; - 100082122                nextCommandOffset = commandOffset + commandSize; - 100082123                if (nextCommandOffset > _memory.Length) + 101518121                commandOffset = _nextCommandOffset; + 101518122                nextCommandOffset = commandOffset + commandSize; + 101518123                if (nextCommandOffset > _memory.Length)  124                { - 19125                    if (nextCommandOffset > MaxCapacity) + 22125                    if (nextCommandOffset > MaxCapacity)  126                    {  1127                        Throw();  128                    }  129 - 18130                    _lockObject?.EnterWriteLock(); + 21130                    _lockObject?.EnterWriteLock();  131                    try  132                    { - 18133                        ArrayExtension.EnsureLength(ref _memory, nextCommandOffset, MaxCapacity); - 18134                    } + 21133                        ArrayExtension.EnsureLength(ref _memory, nextCommandOffset, MaxCapacity); + 21134                    }  135                    finally  136                    { - 18137                        _lockObject?.ExitWriteLock(); - 18138                    } + 21137                        _lockObject?.ExitWriteLock(); + 21138                    }  139                }  140            } - 100081141            while (Interlocked.CompareExchange(ref _nextCommandOffset, nextCommandOffset, commandOffset) != commandOffse + 101517141            while (Interlocked.CompareExchange(ref _nextCommandOffset, nextCommandOffset, commandOffset) != commandOffse  142  100081143            return commandOffset;  144        } @@ -293,7 +293,7 @@

D:\Pr  240} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityCopyMessage.htm b/docs/coverage/DefaultEcs_EntityCopyMessage.htm index f15f5c34..60909fae 100644 --- a/docs/coverage/DefaultEcs_EntityCopyMessage.htm +++ b/docs/coverage/DefaultEcs_EntityCopyMessage.htm @@ -54,7 +54,7 @@

 14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityCreatedMessage.htm b/docs/coverage/DefaultEcs_EntityCreatedMessage.htm index 60fea906..ff372bd5 100644 --- a/docs/coverage/DefaultEcs_EntityCreatedMessage.htm +++ b/docs/coverage/DefaultEcs_EntityCreatedMessage.htm @@ -46,13 +46,13 @@

 6  7        public EntityCreatedMessage(int entityId)  8        { - 1002389            EntityId = entityId; - 10023810        } + 1002409            EntityId = entityId; + 10024010        }  11    }  12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityDebugView.htm b/docs/coverage/DefaultEcs_EntityDebugView.htm index 3d06f743..34505e3b 100644 --- a/docs/coverage/DefaultEcs_EntityDebugView.htm +++ b/docs/coverage/DefaultEcs_EntityDebugView.htm @@ -102,7 +102,7 @@

D:\P  58} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityDisabledMessage.htm b/docs/coverage/DefaultEcs_EntityDisabledMessage.htm index 7f8e067f..8b16a33f 100644 --- a/docs/coverage/DefaultEcs_EntityDisabledMessage.htm +++ b/docs/coverage/DefaultEcs_EntityDisabledMessage.htm @@ -52,7 +52,7 @@

 12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityDisposedMessage.htm b/docs/coverage/DefaultEcs_EntityDisposedMessage.htm index dfd0a5f2..5c107fc6 100644 --- a/docs/coverage/DefaultEcs_EntityDisposedMessage.htm +++ b/docs/coverage/DefaultEcs_EntityDisposedMessage.htm @@ -52,7 +52,7 @@

 12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityDisposingMessage.htm b/docs/coverage/DefaultEcs_EntityDisposingMessage.htm index 9f54a71d..6d811086 100644 --- a/docs/coverage/DefaultEcs_EntityDisposingMessage.htm +++ b/docs/coverage/DefaultEcs_EntityDisposingMessage.htm @@ -52,7 +52,7 @@

 12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityEnabledMessage.htm b/docs/coverage/DefaultEcs_EntityEnabledMessage.htm index 5518df86..f0ab5db6 100644 --- a/docs/coverage/DefaultEcs_EntityEnabledMessage.htm +++ b/docs/coverage/DefaultEcs_EntityEnabledMessage.htm @@ -47,14 +47,14 @@

 7  8        public EntityEnabledMessage(int entityId, ComponentEnum components)  9        { - 410            EntityId = entityId; - 411            Components = components; - 412        } + 510            EntityId = entityId; + 511            Components = components; + 512        }  13    }  14} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityOffsetCommand.htm b/docs/coverage/DefaultEcs_EntityOffsetCommand.htm index 1bb6483b..d669fd77 100644 --- a/docs/coverage/DefaultEcs_EntityOffsetCommand.htm +++ b/docs/coverage/DefaultEcs_EntityOffsetCommand.htm @@ -140,7 +140,7 @@

D:\Projec  100} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityOffsetComponentCommand.htm b/docs/coverage/DefaultEcs_EntityOffsetComponentCommand.htm index 65d9a707..163cf8e2 100644 --- a/docs/coverage/DefaultEcs_EntityOffsetComponentCommand.htm +++ b/docs/coverage/DefaultEcs_EntityOffsetComponentCommand.htm @@ -140,7 +140,7 @@

D:\Projec  100} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityRecord.htm b/docs/coverage/DefaultEcs_EntityRecord.htm index a294cb67..11960cd5 100644 --- a/docs/coverage/DefaultEcs_EntityRecord.htm +++ b/docs/coverage/DefaultEcs_EntityRecord.htm @@ -176,7 +176,7 @@

D:\Projects\De  126} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityReferenceOffsetComponentCommand.htm b/docs/coverage/DefaultEcs_EntityReferenceOffsetComponentCommand.htm index 50d06bd6..0990a492 100644 --- a/docs/coverage/DefaultEcs_EntityReferenceOffsetComponentCommand.htm +++ b/docs/coverage/DefaultEcs_EntityReferenceOffsetComponentCommand.htm @@ -140,7 +140,7 @@

D:\Projec  100} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySet.htm b/docs/coverage/DefaultEcs_EntitySet.htm index c6dee111..0bd2d228 100644 --- a/docs/coverage/DefaultEcs_EntitySet.htm +++ b/docs/coverage/DefaultEcs_EntitySet.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.EntitySet Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\EntitySet.cs -Covered lines:75 -Uncovered lines:5 +Covered lines:80 +Uncovered lines:0 Coverable lines:80 Total lines:247 -Line coverage:93.7% (75 of 80) -Covered branches:36 +Line coverage:100% (80 of 80) +Covered branches:38 Total branches:38 -Branch coverage:94.7% (36 of 38) +Branch coverage:100% (38 of 38)

Metrics

@@ -32,17 +32,17 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage add_EntityAdded(...)40100%100% -remove_EntityAdded(...)100%100% +remove_EntityAdded(...)10100%100% .ctor(...)60100%100% Add(...)40100%100% Remove(...)80100%100% Add(...)10100%100% -CheckedAdd(...)200%0% +CheckedAdd(...)20100%100% CheckedAdd(...)20100%100% CheckedAdd(...)20100%100% CheckedAdd(...)20100%100% Remove(...)10100%100% -Remove(...)100%100% +Remove(...)10100%100% Remove(...)10100%100% Remove(...)10100%100% CheckedRemove(...)20100%100% @@ -105,7 +105,7 @@

D:\Projects\DefaultEcs\s  45                }  446                EntityAddedEvent += value;  447            } - 048            remove => EntityAddedEvent -= value; + 148            remove => EntityAddedEvent -= value;  49        }  50  51        /// <summary> @@ -122,8 +122,8 @@

D:\Projects\DefaultEcs\s  62        /// </summary>  63        public int Count  64        { - 30765            get; - 18766            private set; + 31965            get; + 19466            private set;  67        }  68  69        #endregion @@ -160,7 +160,7 @@

D:\Projects\DefaultEcs\s  100                {  34101                    if (_filter(world.Info.EntityInfos[i].Components))  102                    { - 27103                        Add(i); + 28103                        Add(i);  104                    }  105                }  106            } @@ -173,40 +173,40 @@

D:\Projects\DefaultEcs\s  113        [MethodImpl(MethodImplOptions.AggressiveInlining)]  114        private void Add(int entityId)  115        { - 126116            ArrayExtension.EnsureLength(ref _mapping, entityId, _maxEntityCount, -1); + 130116            ArrayExtension.EnsureLength(ref _mapping, entityId, _maxEntityCount, -1);  117 - 126118            ref int index = ref _mapping[entityId]; - 126119            if (index == -1) + 130118            ref int index = ref _mapping[entityId]; + 130119            if (index == -1)  120            { - 122121                index = Count++; + 126121                index = Count++;  122 - 122123                ArrayExtension.EnsureLength(ref _entities, index, _maxEntityCount); + 126123                ArrayExtension.EnsureLength(ref _entities, index, _maxEntityCount);  124 - 122125                _entities[index] = new Entity(_worldId, entityId); - 122126                EntityAddedEvent?.Invoke(_entities[index]); + 126125                _entities[index] = new Entity(_worldId, entityId); + 126126                EntityAddedEvent?.Invoke(_entities[index]);  127            }  6128        }  129  130        [MethodImpl(MethodImplOptions.AggressiveInlining)]  131        private void Remove(int entityId)  132        { - 42133            if (entityId < _mapping.Length) + 45133            if (entityId < _mapping.Length)  134            { - 34135                ref int index = ref _mapping[entityId]; - 34136                if (index != -1) + 37135                ref int index = ref _mapping[entityId]; + 37136                if (index != -1)  137                { - 30138                    Entity entity = _entities[index]; - 30139                    --Count; + 33138                    Entity entity = _entities[index]; + 33139                    --Count;  140 - 30141                    if (index != Count) + 33141                    if (index != Count)  142                    {  18143                        _entities[index] = _entities[Count];  18144                        _mapping[_entities[Count].EntityId] = index;  145                    }  146 - 30147                    index = -1; + 33147                    index = -1;  148 - 30149                    EntityRemoved?.Invoke(entity); + 33149                    EntityRemoved?.Invoke(entity);  150                }  151            }  14152        } @@ -215,19 +215,19 @@

D:\Projects\DefaultEcs\s  155  156        internal void CheckedAdd(in EntityEnabledMessage message)  157        { - 0158            if (_filter(message.Components)) + 1158            if (_filter(message.Components))  159            { - 0160                Add(message.EntityId); + 1160                Add(message.EntityId);  161            } - 0162        } + 1162        }  163  164        internal void CheckedAdd<T>(in ComponentAddedMessage<T> message)  165        { - 42166            if (_filter(message.Components)) + 44166            if (_filter(message.Components))  167            { - 38168                Add(message.EntityId); + 40168                Add(message.EntityId);  169            } - 42170        } + 44170        }  171  172        internal void CheckedAdd<T>(in ComponentChangedMessage<T> message)  173        { @@ -247,9 +247,9 @@

D:\Projects\DefaultEcs\s  187  12188        internal void Remove(in EntityDisposingMessage message) => Remove(message.EntityId);  189 - 0190        internal void Remove(in EntityDisabledMessage message) => Remove(message.EntityId); + 1190        internal void Remove(in EntityDisabledMessage message) => Remove(message.EntityId);  191 - 9192        internal void Remove<T>(in ComponentRemovedMessage<T> message) => Remove(message.EntityId); + 11192        internal void Remove<T>(in ComponentRemovedMessage<T> message) => Remove(message.EntityId);  193  12194        internal void Remove<T>(in ComponentAddedMessage<T> message) => Remove(message.EntityId);  195 @@ -270,14 +270,14 @@

D:\Projects\DefaultEcs\s  16210        }  211  212        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 56213        internal ReadOnlySpan<Entity> GetEntities(int start, int length) => new ReadOnlySpan<Entity>(_entities, start, l + 58213        internal ReadOnlySpan<Entity> GetEntities(int start, int length) => new ReadOnlySpan<Entity>(_entities, start, l  214  215        /// <summary>  216        /// Gets the <see cref="Entity"/> contained in the current <see cref="EntitySet"/>.  217        /// </summary>  218        /// <returns>A <see cref="ReadOnlySpan{T}"/> of the <see cref="Entity"/> contained in the current <see cref="Ent  219        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 51220        public ReadOnlySpan<Entity> GetEntities() => GetEntities(0, Count); + 53220        public ReadOnlySpan<Entity> GetEntities() => GetEntities(0, Count);  221  222        /// <summary>  223        /// Clears current instance of its entities if it was created with some reactive filter (<seealso cref="EntitySe @@ -307,7 +307,7 @@

D:\Projects\DefaultEcs\s  247} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySetBuilder.htm b/docs/coverage/DefaultEcs_EntitySetBuilder.htm index 708d0316..6ba98834 100644 --- a/docs/coverage/DefaultEcs_EntitySetBuilder.htm +++ b/docs/coverage/DefaultEcs_EntitySetBuilder.htm @@ -558,7 +558,7 @@

D:\Projects\Defau  495} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySetBuilderExtension.htm b/docs/coverage/DefaultEcs_EntitySetBuilderExtension.htm index 440c9f02..177068ed 100644 --- a/docs/coverage/DefaultEcs_EntitySetBuilderExtension.htm +++ b/docs/coverage/DefaultEcs_EntitySetBuilderExtension.htm @@ -147,7 +147,7 @@

D:\Proje  103} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySetBuilderFactory.htm b/docs/coverage/DefaultEcs_EntitySetBuilderFactory.htm index eec89ec2..c458db53 100644 --- a/docs/coverage/DefaultEcs_EntitySetBuilderFactory.htm +++ b/docs/coverage/DefaultEcs_EntitySetBuilderFactory.htm @@ -107,7 +107,7 @@

 64} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySetDebugView.htm b/docs/coverage/DefaultEcs_EntitySetDebugView.htm index 670f9f53..22a79eac 100644 --- a/docs/coverage/DefaultEcs_EntitySetDebugView.htm +++ b/docs/coverage/DefaultEcs_EntitySetDebugView.htm @@ -57,7 +57,7 @@

D  17} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntitySetFilterFactory.htm b/docs/coverage/DefaultEcs_EntitySetFilterFactory.htm index c4a99533..a9906f55 100644 --- a/docs/coverage/DefaultEcs_EntitySetFilterFactory.htm +++ b/docs/coverage/DefaultEcs_EntitySetFilterFactory.htm @@ -78,7 +78,7 @@

D:  35                {  436                    if (withoutEitherFilters is null)  37                    { - 5938                        return c => c.Contains(withFilter); + 6238                        return c => c.Contains(withFilter);  39                    }  40  141                    if (withoutEitherFilters.Count == 1) @@ -172,7 +172,7 @@

D:  129} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityWriter.htm b/docs/coverage/DefaultEcs_EntityWriter.htm index f2e5641f..d911859f 100644 --- a/docs/coverage/DefaultEcs_EntityWriter.htm +++ b/docs/coverage/DefaultEcs_EntityWriter.htm @@ -120,21 +120,21 @@

 77  78        void IComponentReader.OnRead<T>(ref T component, in Entity componentOwner)  79        { - 4880            if (!_types.TryGetValue(typeof(T), out ushort _)) + 5080            if (!_types.TryGetValue(typeof(T), out ushort _))  81            { - 1982                _types.Add(typeof(T), _currentType); + 2082                _types.Add(typeof(T), _currentType);  83 - 1984                *_bufferP = (byte)EntryType.ComponentType; - 1985                ushort* entryType = (ushort*)(_bufferP + 1); - 1986                *(entryType++) = _currentType; - 1987                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort)); - 1988                Converter<string>.Write(typeof(T).AssemblyQualifiedName, _stream, _buffer, _bufferP); + 2084                *_bufferP = (byte)EntryType.ComponentType; + 2085                ushort* entryType = (ushort*)(_bufferP + 1); + 2086                *(entryType++) = _currentType; + 2087                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort)); + 2088                Converter<string>.Write(typeof(T).AssemblyQualifiedName, _stream, _buffer, _bufferP);  89 - 1990                ++_currentType; + 2090                ++_currentType;  91            }  92 - 4893            Tuple<Entity, Type> componentKey = Tuple.Create(componentOwner, typeof(T)); - 4894            if (_components.TryGetValue(componentKey, out int key)) + 5093            Tuple<Entity, Type> componentKey = Tuple.Create(componentOwner, typeof(T)); + 5094            if (_components.TryGetValue(componentKey, out int key))  95            {  696                *_bufferP = (byte)(_currentEntity.IsEnabled<T>() ? EntryType.ComponentSameAs : EntryType.DisabledCompone  697                ushort* typeId = (ushort*)(_bufferP + 1); @@ -145,22 +145,22 @@

 6102            }  103            else  104            { - 42105                _components.Add(componentKey, _entityCount); - 42106                *_bufferP = (byte)(_currentEntity.IsEnabled<T>() ? EntryType.Component : EntryType.DisabledComponent); - 42107                *(ushort*)(_bufferP + 1) = _types[typeof(T)]; + 44105                _components.Add(componentKey, _entityCount); + 44106                *_bufferP = (byte)(_currentEntity.IsEnabled<T>() ? EntryType.Component : EntryType.DisabledComponent); + 44107                *(ushort*)(_bufferP + 1) = _types[typeof(T)];  108 - 42109                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort)); + 44109                _stream.Write(_buffer, 0, sizeof(byte) + sizeof(ushort));  110 - 42111                Converter<T>.Write(component, _stream, _buffer, _bufferP); + 44111                Converter<T>.Write(component, _stream, _buffer, _bufferP);  112            } - 42113        } + 44113        }  114  115        #endregion  116    }  117} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_EntityWriter2.htm b/docs/coverage/DefaultEcs_EntityWriter2.htm index e7c2c803..21e617c3 100644 --- a/docs/coverage/DefaultEcs_EntityWriter2.htm +++ b/docs/coverage/DefaultEcs_EntityWriter2.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.Technical.Serialization.TextSerializer.EntityWriter Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\Technical\Serialization\TextSerializer\EntityWriter.cs -Covered lines:34 -Uncovered lines:1 +Covered lines:35 +Uncovered lines:0 Coverable lines:35 Total lines:101 -Line coverage:97.1% (34 of 35) -Covered branches:19 +Line coverage:100% (35 of 35) +Covered branches:20 Total branches:20 -Branch coverage:95% (19 of 20) +Branch coverage:100% (20 of 20)

Metrics

@@ -33,7 +33,7 @@

Metrics

.ctor(...)10100%100% Write(...)100100%100% -DefaultEcs.Serialization.IComponentReader.OnRead(T&,DefaultEcs.Entity& modreq(...)10094.11%90% +DefaultEcs.Serialization.IComponentReader.OnRead(T&,DefaultEcs.Entity& modreq(...)100100%100%

File(s)

@@ -109,42 +109,42 @@

 66  67        void IComponentReader.OnRead<T>(ref T component, in Entity componentOwner)  68        { - 4869            if (!_types.TryGetValue(typeof(T), out _)) + 5069            if (!_types.TryGetValue(typeof(T), out _))  70            { - 1971                string typeName = typeof(T).Name; + 2071                string typeName = typeof(T).Name;  72 - 1973                int repeatCount = 1; - 1974                while (_types.ContainsValue(typeName)) + 2073                int repeatCount = 1; + 2174                while (_types.ContainsValue(typeName))  75                { - 076                    typeName = $"{typeof(T).Name}_{repeatCount++}"; + 176                    typeName = $"{typeof(T).Name}_{repeatCount++}";  77                }  78 - 1979                _types.Add(typeof(T), typeName); + 2079                _types.Add(typeof(T), typeName);  80 - 1981                _writer.WriteLine($"{nameof(EntryType.ComponentType)} {typeName} {typeof(T).FullName}, {typeof(T).GetTyp + 2081                _writer.WriteLine($"{nameof(EntryType.ComponentType)} {typeName} {typeof(T).FullName}, {typeof(T).GetTyp  82            }  83 - 4884            Tuple<Entity, Type> componentKey = Tuple.Create(componentOwner, typeof(T)); - 4885            if (_components.TryGetValue(componentKey, out int key)) + 5084            Tuple<Entity, Type> componentKey = Tuple.Create(componentOwner, typeof(T)); + 5085            if (_components.TryGetValue(componentKey, out int key))  86            {  687                string entry = _currentEntity.IsEnabled<T>() ? nameof(EntryType.ComponentSameAs) : nameof(EntryType.Disa  688                _writer.WriteLine($"{entry} {_types[typeof(T)]} {key}");  689            }  90            else  91            { - 4292                _components.Add(componentKey, _entityCount); - 4293                string entry = _currentEntity.IsEnabled<T>() ? nameof(EntryType.Component) : nameof(EntryType.DisabledCo - 4294                _writer.Write($"{entry} {_types[typeof(T)]} "); - 4295                Converter<T>.Write(component, _writer, 0); + 4492                _components.Add(componentKey, _entityCount); + 4493                string entry = _currentEntity.IsEnabled<T>() ? nameof(EntryType.Component) : nameof(EntryType.DisabledCo + 4494                _writer.Write($"{entry} {_types[typeof(T)]} "); + 4495                Converter<T>.Write(component, _writer, 0);  96            } - 4297        } + 4497        }  98  99        #endregion  100    }  101} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Executer.htm b/docs/coverage/DefaultEcs_Executer.htm index 3f18185c..18289928 100644 --- a/docs/coverage/DefaultEcs_Executer.htm +++ b/docs/coverage/DefaultEcs_Executer.htm @@ -134,7 +134,7 @@

D:\Projec  93} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_IDisposableExtension.htm b/docs/coverage/DefaultEcs_IDisposableExtension.htm index 76e2930f..3b857703 100644 --- a/docs/coverage/DefaultEcs_IDisposableExtension.htm +++ b/docs/coverage/DefaultEcs_IDisposableExtension.htm @@ -62,10 +62,10 @@

 18  19            #region Initialisation  20 - 17221            public DisposableGroup(IEnumerable<IDisposable> disposables) + 17421            public DisposableGroup(IEnumerable<IDisposable> disposables)  22            { - 17223                _disposables = GetDisposables(disposables).ToArray(); - 17224            } + 17423                _disposables = GetDisposables(disposables).ToArray(); + 17424            }  25  26            #endregion  27 @@ -73,9 +73,9 @@

 29  30            private IEnumerable<IDisposable> GetDisposables(IEnumerable<IDisposable> disposables)  31            { - 125832                foreach (IDisposable disposable in disposables) + 127032                foreach (IDisposable disposable in disposables)  33                { - 45734                    if (disposable is DisposableGroup group) + 46134                    if (disposable is DisposableGroup group)  35                    {  036                        foreach (IDisposable child in group._disposables)  37                        { @@ -84,10 +84,10 @@

 040                    }  41                    else  42                    { - 45743                        yield return disposable; + 46143                        yield return disposable;  44                    }  45                } - 17246            } + 17446            }  47  48            #endregion  49 @@ -110,14 +110,14 @@

 66  67        #region Methods  68 - 17269        public static IDisposable Merge(this IEnumerable<IDisposable> disposables) => new DisposableGroup(disposables ?? + 17469        public static IDisposable Merge(this IEnumerable<IDisposable> disposables) => new DisposableGroup(disposables ??  70  71        #endregion  72    }  73} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_IPublisherExtension.htm b/docs/coverage/DefaultEcs_IPublisherExtension.htm index bff3a143..d99e6381 100644 --- a/docs/coverage/DefaultEcs_IPublisherExtension.htm +++ b/docs/coverage/DefaultEcs_IPublisherExtension.htm @@ -73,38 +73,38 @@

D:\Projects\De  28  29        private static IDisposable Subscribe(IPublisher publisher, Type type, object target)  30        { - 14631            List<IDisposable> subscriptions = new List<IDisposable>(); + 14831            List<IDisposable> subscriptions = new List<IDisposable>();  32  33            try  34            { - 43635                while (type != null) + 44235                while (type != null)  36                { - 114937                    foreach (MethodInfo method in type.GetTypeInfo().DeclaredMethods - 448138                        .Where(m => m.GetCustomAttribute<SubscribeAttribute>(false) != null && (m.IsStatic || target !=  + 116537                    foreach (MethodInfo method in type.GetTypeInfo().DeclaredMethods + 454538                        .Where(m => m.GetCustomAttribute<SubscribeAttribute>(false) != null && (m.IsStatic || target !=   39                    { - 28340                        ParameterInfo[] parameters = method.GetParameters(); + 28740                        ParameterInfo[] parameters = method.GetParameters();  41 - 28342                        if (parameters.Length != 1 - 28343                            || !parameters[0].ParameterType.IsByRef - 28344                            || method.ReturnType != typeof(void)) + 28742                        if (parameters.Length != 1 + 28743                            || !parameters[0].ParameterType.IsByRef + 28744                            || method.ReturnType != typeof(void))  45                        {  346                            throw new NotSupportedException($"Can't apply {nameof(SubscribeAttribute)} to \"{method.Name  47                        }  48 - 28049                        Type argType = parameters[0].ParameterType.GetElementType(); - 28050                        subscriptions.Add((IDisposable)_subscribeMethod.MakeGenericMethod(argType).Invoke( - 28051                            publisher, - 28052                            new object[] - 28053                            { - 28054                            method.IsStatic - 28055                                ? method.CreateDelegate(typeof(ActionIn<>).MakeGenericType(argType)) - 28056                                : method.CreateDelegate(typeof(ActionIn<>).MakeGenericType(argType), target) - 28057                            })); + 28449                        Type argType = parameters[0].ParameterType.GetElementType(); + 28450                        subscriptions.Add((IDisposable)_subscribeMethod.MakeGenericMethod(argType).Invoke( + 28451                            publisher, + 28452                            new object[] + 28453                            { + 28454                            method.IsStatic + 28455                                ? method.CreateDelegate(typeof(ActionIn<>).MakeGenericType(argType)) + 28456                                : method.CreateDelegate(typeof(ActionIn<>).MakeGenericType(argType), target) + 28457                            }));  58                    }  59 - 29060                    type = type.GetTypeInfo().BaseType; + 29460                    type = type.GetTypeInfo().BaseType;  61                } - 14362            } + 14562            }  363            catch  64            {  665                foreach (IDisposable disposable in subscriptions) @@ -115,7 +115,7 @@

D:\Projects\De  370                throw;  71            }  72 - 14373            return subscriptions.Count > 1 ? subscriptions.Merge() : subscriptions.FirstOrDefault(); + 14573            return subscriptions.Count > 1 ? subscriptions.Merge() : subscriptions.FirstOrDefault();  74        }  75  76        /// <summary> @@ -156,10 +156,10 @@

D:\Projects\De  111        public static IDisposable Subscribe<T>(this IPublisher publisher, T target)  112            where T : class  113        { - 144114            return Subscribe( - 144115                publisher ?? throw new ArgumentNullException(nameof(publisher)), - 144116                (target ?? throw new ArgumentNullException(nameof(target))).GetType(), - 144117                target); + 146114            return Subscribe( + 146115                publisher ?? throw new ArgumentNullException(nameof(publisher)), + 146116                (target ?? throw new ArgumentNullException(nameof(target))).GetType(), + 146117                target);  118        }  119  120        #endregion @@ -167,7 +167,7 @@

D:\Projects\De  122} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ISerializerExtension.htm b/docs/coverage/DefaultEcs_ISerializerExtension.htm index a76a0b0e..539970c2 100644 --- a/docs/coverage/DefaultEcs_ISerializerExtension.htm +++ b/docs/coverage/DefaultEcs_ISerializerExtension.htm @@ -17,11 +17,11 @@

< Summary

Class:DefaultEcs.Serialization.ISerializerExtension Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\Serialization\ISerializer.cs -Covered lines:0 -Uncovered lines:1 +Covered lines:1 +Uncovered lines:0 Coverable lines:1 Total lines:54 -Line coverage:0% (0 of 1) +Line coverage:100% (1 of 1) Covered branches:0 Total branches:0 @@ -30,7 +30,7 @@

Metrics

- +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
Serialize(...)100%100%
Serialize(...)10100%100%

File(s)

@@ -54,7 +54,7 @@

D:\Projec  14        /// <param name="serializer">The <see cref="ISerializer"/> instance to use.</param>  15        /// <param name="stream">The <see cref="Stream"/> in which the data will be saved.</param>  16        /// <param name="entities">The <see cref="Entity"/> instances to save.</param> - 017        public static void Serialize(this ISerializer serializer, Stream stream, params Entity[] entities) => serializer + 217        public static void Serialize(this ISerializer serializer, Stream stream, params Entity[] entities) => serializer  18    }  19  20    /// <summary> @@ -94,7 +94,7 @@

D:\Projec  54} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_IntDispenser.htm b/docs/coverage/DefaultEcs_IntDispenser.htm index e94d869c..0558be50 100644 --- a/docs/coverage/DefaultEcs_IntDispenser.htm +++ b/docs/coverage/DefaultEcs_IntDispenser.htm @@ -58,18 +58,18 @@

D:\Projects\  15  16        #region Properties  17 - 10014518        public int LastInt => _lastInt; + 10014718        public int LastInt => _lastInt;  19  20        #endregion  21  22        #region Initialisation  23 - 13824        public IntDispenser(int startInt) + 14024        public IntDispenser(int startInt)  25        { - 13826            _freeInts = new ConcurrentStack<int>(); + 14026            _freeInts = new ConcurrentStack<int>();  27 - 13828            _lastInt = startInt; - 13829        } + 14028            _lastInt = startInt; + 14029        }  30  31        #endregion  32 @@ -77,22 +77,22 @@

D:\Projects\  34  35        public int GetFreeInt()  36        { - 10038337            if (!_freeInts.TryPop(out int freeInt)) + 10038737            if (!_freeInts.TryPop(out int freeInt))  38            { - 10024939                freeInt = Interlocked.Increment(ref _lastInt); + 10025139                freeInt = Interlocked.Increment(ref _lastInt);  40            }  41 - 10038342            return freeInt; + 10038742            return freeInt;  43        }  44 - 16945        public void ReleaseInt(int releasedInt) => _freeInts.Push(releasedInt); + 17145        public void ReleaseInt(int releasedInt) => _freeInts.Push(releasedInt);  46  47        #endregion  48    }  49} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ManagedComponentCommand_1.htm b/docs/coverage/DefaultEcs_ManagedComponentCommand_1.htm index 056ba31d..e99be2c2 100644 --- a/docs/coverage/DefaultEcs_ManagedComponentCommand_1.htm +++ b/docs/coverage/DefaultEcs_ManagedComponentCommand_1.htm @@ -64,7 +64,7 @@

 23} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ManagedResourceReleaseMessage_1.htm b/docs/coverage/DefaultEcs_ManagedResourceReleaseMessage_1.htm index 0f3e5788..0fac259e 100644 --- a/docs/coverage/DefaultEcs_ManagedResourceReleaseMessage_1.htm +++ b/docs/coverage/DefaultEcs_ManagedResourceReleaseMessage_1.htm @@ -46,13 +46,13 @@

 6  7        public ManagedResourceReleaseMessage(T managedResource)  8        { - 89            ManagedResource = managedResource; - 810        } + 99            ManagedResource = managedResource; + 910        }  11    }  12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ManagedResourceRequestMessage_1.htm b/docs/coverage/DefaultEcs_ManagedResourceRequestMessage_1.htm index 24035138..536c50e2 100644 --- a/docs/coverage/DefaultEcs_ManagedResourceRequestMessage_1.htm +++ b/docs/coverage/DefaultEcs_ManagedResourceRequestMessage_1.htm @@ -50,14 +50,14 @@

 10  11        public ManagedResourceRequestMessage(in Entity entity, T managedResource)  12        { - 813            Entity = entity; - 814            ManagedResource = managedResource; - 815        } + 1013            Entity = entity; + 1014            ManagedResource = managedResource; + 1015        }  16    }  17} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ManagedResource_2.htm b/docs/coverage/DefaultEcs_ManagedResource_2.htm index 907c69e7..925f80ab 100644 --- a/docs/coverage/DefaultEcs_ManagedResource_2.htm +++ b/docs/coverage/DefaultEcs_ManagedResource_2.htm @@ -61,13 +61,13 @@

D:\Project  21        /// <param name="info">The info used to identify the resource.</param>  22        public ManagedResource(TInfo info)  23        { - 924            Info = info; - 925        } + 1024            Info = info; + 1025        }  26    }  27} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ObjectInitializer.htm b/docs/coverage/DefaultEcs_ObjectInitializer.htm index 692fd0cb..9f6c4f3f 100644 --- a/docs/coverage/DefaultEcs_ObjectInitializer.htm +++ b/docs/coverage/DefaultEcs_ObjectInitializer.htm @@ -73,7 +73,7 @@

 33} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_ParallelSystem_1.htm b/docs/coverage/DefaultEcs_ParallelSystem_1.htm index 69779b2d..6c37c4a8 100644 --- a/docs/coverage/DefaultEcs_ParallelSystem_1.htm +++ b/docs/coverage/DefaultEcs_ParallelSystem_1.htm @@ -132,7 +132,7 @@

D:\Projects\D  87} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Publisher.htm b/docs/coverage/DefaultEcs_Publisher.htm index d2e2271d..a53bf7f9 100644 --- a/docs/coverage/DefaultEcs_Publisher.htm +++ b/docs/coverage/DefaultEcs_Publisher.htm @@ -48,7 +48,7 @@

D:\Projects\Def  8    internal static class Publisher  9    {  10        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 66411        public static void Publish<T>(int worldId, in T message) => Publisher<T>.Publish(worldId, message); + 72211        public static void Publish<T>(int worldId, in T message) => Publisher<T>.Publish(worldId, message);  12    }  13  14    internal static class Publisher<T> @@ -157,7 +157,7 @@

D:\Projects\Def  117} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_Publisher_1.htm b/docs/coverage/DefaultEcs_Publisher_1.htm index 44b2eb04..04fc4382 100644 --- a/docs/coverage/DefaultEcs_Publisher_1.htm +++ b/docs/coverage/DefaultEcs_Publisher_1.htm @@ -74,9 +74,9 @@

D:\Projects\Def  28  29            public Subscription(int worldId, ActionIn<T> action)  30            { - 153831                _worldId = worldId; - 153832                _action = action; - 153833            } + 175831                _worldId = worldId; + 175832                _action = action; + 175833            }  34  35            #endregion  36 @@ -107,15 +107,15 @@

D:\Projects\Def  61  62        static Publisher()  63        { - 4664            _lockObject = new object(); + 6764            _lockObject = new object();  65 - 4666            Actions = new ActionIn<T>[2]; + 6766            Actions = new ActionIn<T>[2];  67 - 4668            if (typeof(T) != typeof(WorldDisposedMessage)) + 6768            if (typeof(T) != typeof(WorldDisposedMessage))  69            { - 4570                Publisher<WorldDisposedMessage>.Subscribe(0, On); + 6670                Publisher<WorldDisposedMessage>.Subscribe(0, On);  71            } - 4672        } + 6772        }  73  74        #endregion  75 @@ -123,14 +123,14 @@

D:\Projects\Def  77  78        private static void On(in WorldDisposedMessage message)  79        { - 341880            lock (_lockObject) + 550180            lock (_lockObject)  81            { - 341882                if (message.WorldId < Actions.Length) + 550182                if (message.WorldId < Actions.Length)  83                { - 247684                    Actions[message.WorldId] = null; + 358284                    Actions[message.WorldId] = null;  85                } - 341886            } - 341887        } + 550186            } + 550187        }  88  89        #endregion  90 @@ -139,31 +139,31 @@

D:\Projects\Def  93        [MethodImpl(MethodImplOptions.AggressiveInlining)]  94        public static IDisposable Subscribe(int worldId, ActionIn<T> action)  95        { - 153896            lock (_lockObject) + 175896            lock (_lockObject)  97            { - 153898                ArrayExtension.EnsureLength(ref Actions, worldId); + 175898                ArrayExtension.EnsureLength(ref Actions, worldId);  99 - 1538100                Actions[worldId] += action; - 1538101            } + 1758100                Actions[worldId] += action; + 1758101            }  102 - 1538103            return new Subscription(worldId, action); + 1758103            return new Subscription(worldId, action);  104        }  105  106        [MethodImpl(MethodImplOptions.AggressiveInlining)]  107        public static void Publish(int worldId, in T message)  108        { - 101068109            if (worldId < Actions.Length) + 101130109            if (worldId < Actions.Length)  110            { - 100838111                Actions[worldId]?.Invoke(message); + 100894111                Actions[worldId]?.Invoke(message);  112            } - 610113        } + 625113        }  114  115        #endregion  116    }  117} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_SequentialSystem_1.htm b/docs/coverage/DefaultEcs_SequentialSystem_1.htm index 495f4d19..2209192a 100644 --- a/docs/coverage/DefaultEcs_SequentialSystem_1.htm +++ b/docs/coverage/DefaultEcs_SequentialSystem_1.htm @@ -113,7 +113,7 @@

D:\Projects  70} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_StringConverter.htm b/docs/coverage/DefaultEcs_StringConverter.htm index 5694f2dc..3123f50a 100644 --- a/docs/coverage/DefaultEcs_StringConverter.htm +++ b/docs/coverage/DefaultEcs_StringConverter.htm @@ -51,51 +51,51 @@

 9  10        public static void Write(in string value, Stream stream, byte[] buffer, byte* bufferP)  11        { - 4612            int* lengthP = (int*)bufferP; - 4613            *lengthP++ = value.Length; - 4614            char* valueP = (char*)lengthP; + 4812            int* lengthP = (int*)bufferP; + 4813            *lengthP++ = value.Length; + 4814            char* valueP = (char*)lengthP;  15 - 4616            int count = sizeof(int); + 4816            int count = sizeof(int);  17 - 1359218            foreach (char c in value) + 1408818            foreach (char c in value)  19            { - 675020                if (count + sizeof(char) > buffer.Length) + 699620                if (count + sizeof(char) > buffer.Length)  21                {  322                    stream.Write(buffer, 0, count);  323                    valueP = (char*)bufferP;  324                    count = 0;  25                }  26 - 675027                *valueP++ = c; - 675028                count += sizeof(char); + 699627                *valueP++ = c; + 699628                count += sizeof(char);  29            }  30 - 4631            stream.Write(buffer, 0, count); - 4632        } + 4831            stream.Write(buffer, 0, count); + 4832        }  33  34        public static string Read(Stream stream, byte[] buffer, byte* bufferP)  35        { - 4636            string value = null; + 4836            string value = null;  37 - 4638            if (stream.Read(buffer, 0, sizeof(int)) == sizeof(int)) + 4838            if (stream.Read(buffer, 0, sizeof(int)) == sizeof(int))  39            { - 4640                int totalLength = *(int*)bufferP * sizeof(char); + 4840                int totalLength = *(int*)bufferP * sizeof(char);  41 - 9542                while (totalLength > 0) + 9942                while (totalLength > 0)  43                { - 4944                    int length = stream.Read(buffer, 0, Math.Min(buffer.Length, totalLength)); + 5144                    int length = stream.Read(buffer, 0, Math.Min(buffer.Length, totalLength));  45 - 4946                    if (length <= 0) + 5146                    if (length <= 0)  47                    {  048                        throw new EndOfStreamException($"Could not deserialize type {typeof(string).FullName}");  49                    }  50 - 4951                    totalLength -= length; - 4952                    value += new string((char*)bufferP, 0, length / sizeof(char)); + 5151                    totalLength -= length; + 5152                    value += new string((char*)bufferP, 0, length / sizeof(char));  53                }  54            }  55 - 4656            return value; + 4856            return value;  57        }  58  59        #endregion @@ -103,7 +103,7 @@

 61} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_SystemRunner_1.htm b/docs/coverage/DefaultEcs_SystemRunner_1.htm index cacea36d..dcc34d5a 100644 --- a/docs/coverage/DefaultEcs_SystemRunner_1.htm +++ b/docs/coverage/DefaultEcs_SystemRunner_1.htm @@ -20,7 +20,7 @@

< Summary

Covered lines:27 Uncovered lines:0 Coverable lines:27 -Total lines:107 +Total lines:117 Line coverage:100% (27 of 27) Covered branches:13 Total branches:16 @@ -31,11 +31,11 @@

Metrics

- - - - - + + + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
.cctor()10100%100%
.ctor(...)60100%83.33%
Update(...)20100%100%
Update(...)40100%100%
Dispose()40100%50%
.cctor()10100%100%
.ctor(...)60100%83.33%
Update(...)20100%100%
Update(...)40100%100%
Dispose()40100%50%

File(s)

@@ -53,114 +53,124 @@

D:\Projects\Def  8  9namespace DefaultEcs.System  10{11    /// <summary>12    /// Represents an helper object used to update a system in parallel.13    /// </summary>14    /// <typeparam name="T">The type of the object used as state to update the system.</typeparam>15    public sealed class SystemRunner<T> : IDisposable16    {17        #region Fields18 - 119        internal static readonly SystemRunner<T> Default = new SystemRunner<T>(1);11    //public interface ISystemRunner<T> : IDisposable12    //{13    //    void Update(ASystem<T> system);14    //}1516    //public interface IRunnableSystem<T> : ISystem<T>17    //{18    //    void Update(int index, int maxIndex);19    //}  2021        private readonly CancellationTokenSource _disposeHandle;22        private readonly WorkerBarrier _barrier;23        private readonly Task[] _tasks;2425        private ASystem<T> _currentSystem;2627        #endregion21    /// <summary>22    /// Represents an helper object used to update a system in parallel.23    /// </summary>24    /// <typeparam name="T">The type of the object used as state to update the system.</typeparam>25    public sealed class SystemRunner<T> : IDisposable26    {27        #region Fields  2829        #region Initialisation + 129        internal static readonly SystemRunner<T> Default = new SystemRunner<T>(1);  3031        /// <summary>32        /// Initialises a new instance of the <see cref="SystemRunner{T}"/> class.33        /// </summary>34        /// <param name="degreeOfParallelism">The number of <see cref="Task"/> instances used to update a system in para35        /// <exception cref="ArgumentException"><paramref name="degreeOfParallelism"/> cannot be inferior to one.</excep - 536        public SystemRunner(int degreeOfParallelism)37        { - 538            IEnumerable<int> indices = degreeOfParallelism >= 1 ? Enumerable.Range(0, degreeOfParallelism - 1) : throw n39 - 540            _disposeHandle = new CancellationTokenSource(); - 941            _tasks = indices.Select(index => new Task(Update, index, TaskCreationOptions.LongRunning)).ToArray(); - 542            _barrier = degreeOfParallelism > 1 ? new WorkerBarrier(_tasks.Length) : null;43 - 1844            foreach (Task task in _tasks)45            { - 446                task.Start(TaskScheduler.Default);47            } - 548        }31        private readonly CancellationTokenSource _disposeHandle;32        private readonly WorkerBarrier _barrier;33        private readonly Task[] _tasks;3435        private ASystem<T> _currentSystem;3637        #endregion3839        #region Initialisation4041        /// <summary>42        /// Initialises a new instance of the <see cref="SystemRunner{T}"/> class.43        /// </summary>44        /// <param name="degreeOfParallelism">The number of <see cref="Task"/> instances used to update a system in para45        /// <exception cref="ArgumentException"><paramref name="degreeOfParallelism"/> cannot be inferior to one.</excep + 546        public SystemRunner(int degreeOfParallelism)47        { + 548            IEnumerable<int> indices = degreeOfParallelism >= 1 ? Enumerable.Range(0, degreeOfParallelism - 1) : throw n  4950        #endregion5152        #region Methods + 550            _disposeHandle = new CancellationTokenSource(); + 951            _tasks = indices.Select(index => new Task(Update, index, TaskCreationOptions.LongRunning)).ToArray(); + 552            _barrier = degreeOfParallelism > 1 ? new WorkerBarrier(_tasks.Length) : null;  5354        private void Update(object state)55        { - 456            int index = (int)state;57 - 458            goto Start; + 1854            foreach (Task task in _tasks)55            { + 456                task.Start(TaskScheduler.Default);57            } + 558        }  5960        Work: - 361            Volatile.Read(ref _currentSystem).Update(index, _tasks.Length);62 - 363            _barrier.Signal();6465        Start: - 766            _barrier.Start();60        #endregion6162        #region Methods6364        private void Update(object state)65        { + 466            int index = (int)state;  67 - 768            if (!_disposeHandle.IsCancellationRequested)69            {70                goto Work;71            } - 472        }7374        [MethodImpl(MethodImplOptions.AggressiveInlining)]75        internal void Update(ASystem<T> system)76        { - 877            Volatile.Write(ref _currentSystem, system);78 - 879            _barrier?.StartWorkers();80 - 881            system.Update(_tasks.Length, _tasks.Length);82 - 883            _barrier?.WaitForWorkers(); - 384        }8586        #endregion8788        #region IDisposable8990        /// <summary>91        /// Releases all the resources used by the current <see cref="SystemRunner{T}"/> instance.92        /// </summary>93        public void Dispose()94        { - 495            _disposeHandle.Cancel();96 - 497            _barrier?.StartWorkers();98 - 499            Task.WaitAll(_tasks);100 - 4101            _barrier?.Dispose(); - 4102            _disposeHandle.Dispose(); - 4103        }104105        #endregion106    }107} + 468            goto Start;6970        Work: + 371            Volatile.Read(ref _currentSystem).Update(index, _tasks.Length);72 + 373            _barrier.Signal();7475        Start: + 776            _barrier.Start();77 + 778            if (!_disposeHandle.IsCancellationRequested)79            {80                goto Work;81            } + 482        }8384        [MethodImpl(MethodImplOptions.AggressiveInlining)]85        internal void Update(ASystem<T> system)86        { + 887            Volatile.Write(ref _currentSystem, system);88 + 889            _barrier?.StartWorkers();90 + 891            system.Update(_tasks.Length, _tasks.Length);92 + 893            _barrier?.WaitForWorkers(); + 394        }9596        #endregion9798        #region IDisposable99100        /// <summary>101        /// Releases all the resources used by the current <see cref="SystemRunner{T}"/> instance.102        /// </summary>103        public void Dispose()104        { + 4105            _disposeHandle.Cancel();106 + 4107            _barrier?.StartWorkers();108 + 4109            Task.WaitAll(_tasks);110 + 4111            _barrier?.Dispose(); + 4112            _disposeHandle.Dispose(); + 4113        }114115        #endregion116    }117} -

+
diff --git a/docs/coverage/DefaultEcs_TextSerializer.htm b/docs/coverage/DefaultEcs_TextSerializer.htm index 71e9d77a..51b6b7ec 100644 --- a/docs/coverage/DefaultEcs_TextSerializer.htm +++ b/docs/coverage/DefaultEcs_TextSerializer.htm @@ -83,19 +83,19 @@

D:\Pro  30        {  31            #region IOperation  32 - 133            public void SetMaximumComponentCount(World world, int maxComponentCount) => world.SetMaximumComponentCount<T + 233            public void SetMaximumComponentCount(World world, int maxComponentCount) => world.SetMaximumComponentCount<T  34  35            public void SetComponent(in Entity entity, string line, StreamReader reader)  36            {  37                try  38                { - 4039                    entity.Set(Converter<T>.Read(line, reader)); - 4040                } + 4239                    entity.Set(Converter<T>.Read(line, reader)); + 4240                }  041                catch (Exception exception)  42                {  043                    throw new ArgumentException("Error while parsing", exception);  44                } - 4045            } + 4245            }  46  447            public void SetSameAsComponent(in Entity entity, in Entity reference) => entity.SetSameAs<T>(reference);  48 @@ -139,14 +139,14 @@

D:\Pro  286                    Entity currentEntity = default;  287                    Dictionary<string, IOperation> operations = new Dictionary<string, IOperation>();  88 - 10489                    while (!reader.EndOfStream) + 10989                    while (!reader.EndOfStream)  90                    { - 10291                        string[] lineParts = reader.ReadLine()?.Split(_split, 2, StringSplitOptions.RemoveEmptyEntries); + 10791                        string[] lineParts = reader.ReadLine()?.Split(_split, 2, StringSplitOptions.RemoveEmptyEntries);  92 - 10293                        if (lineParts?.Length > 0) + 10793                        if (lineParts?.Length > 0)  94                        { - 9695                            string entry = lineParts[0]; - 9696                            if (nameof(EntryType.Entity).Equals(entry)) + 10195                            string entry = lineParts[0]; + 10196                            if (nameof(EntryType.Entity).Equals(entry))  97                            {  498                                if (world == null)  99                                { @@ -159,7 +159,7 @@

D:\Pro  4106                                    entities.Add(lineParts[1], currentEntity);  107                                }  4108                            } - 92109                            else if (nameof(EntryType.DisabledEntity).Equals(entry)) + 97109                            else if (nameof(EntryType.DisabledEntity).Equals(entry))  110                            {  2111                                if (world == null)  112                                { @@ -172,7 +172,7 @@

D:\Pro  2119                                    entities.Add(lineParts[1], currentEntity);  120                                }  2121                            } - 90122                            else if (lineParts.Length > 1) + 95122                            else if (lineParts.Length > 1)  123                            {  124                                switch (entry)  125                                { @@ -194,60 +194,60 @@

D:\Pro  1141                                        break;  142  143                                    case nameof(EntryType.ComponentType): - 38144                                        string[] componentTypeEntry = lineParts[1].Split(_split, 2, StringSplitOptions.R - 38145                                        Type type = Type.GetType(componentTypeEntry[1], false) ?? throw new ArgumentExce + 40144                                        string[] componentTypeEntry = lineParts[1].Split(_split, 2, StringSplitOptions.R + 40145                                        Type type = Type.GetType(componentTypeEntry[1], false) ?? throw new ArgumentExce  146 - 38147                                        operations.Add( - 38148                                            componentTypeEntry[0], - 38149                                            _operations.GetOrAdd( - 38150                                                type, - 57151                                                t => (IOperation)Activator.CreateInstance(typeof(Operation<>).MakeGeneri - 38152                                        break; + 40147                                        operations.Add( + 40148                                            componentTypeEntry[0], + 40149                                            _operations.GetOrAdd( + 40150                                                type, + 60151                                                t => (IOperation)Activator.CreateInstance(typeof(Operation<>).MakeGeneri + 40152                                        break;  153  154                                    case nameof(EntryType.MaxComponentCount): - 1155                                        if (!isNewWorld) + 2155                                        if (!isNewWorld)  156                                        {  0157                                            throw new ArgumentException("Encoutered MaxComponentCount line");  158                                        } - 1159                                        string[] maxComponentCountEntry = lineParts[1].Split(_split, StringSplitOptions. - 1160                                        if (maxComponentCountEntry.Length < 2) + 2159                                        string[] maxComponentCountEntry = lineParts[1].Split(_split, StringSplitOptions. + 2160                                        if (maxComponentCountEntry.Length < 2)  161                                        {  0162                                            throw new ArgumentException($"Unable to get {nameof(EntryType.MaxComponentCo  163                                        } - 1164                                        if (!operations.TryGetValue(maxComponentCountEntry[0], out IOperation operation) + 2164                                        if (!operations.TryGetValue(maxComponentCountEntry[0], out IOperation operation)  165                                        {  0166                                            throw new ArgumentException($"Unknown component type used '{maxComponentCoun  167                                        } - 1168                                        if (!int.TryParse(maxComponentCountEntry[1], NumberStyles.Any, CultureInfo.Invar + 2168                                        if (!int.TryParse(maxComponentCountEntry[1], NumberStyles.Any, CultureInfo.Invar  169                                        {  0170                                            throw new ArgumentException($"Unable to convert '{maxComponentCountEntry[1]}  171                                        }  172 - 1173                                        if (world == null) + 2173                                        if (world == null)  174                                        {  0175                                            world = new World();  176                                        }  177 - 1178                                        operation.SetMaximumComponentCount(world, maxComponentCount); - 1179                                        break; + 2178                                        operation.SetMaximumComponentCount(world, maxComponentCount); + 2179                                        break;  180  181                                    case nameof(EntryType.Component): - 40182                                        if (currentEntity.Equals(default)) + 42182                                        if (currentEntity.Equals(default))  183                                        {  0184                                            throw new ArgumentException("Encountered a component before creation of an E  185                                        } - 40186                                        string[] componentEntry = lineParts[1].Split(_split, 2, StringSplitOptions.Remov - 40187                                        if (componentEntry.Length < 1) + 42186                                        string[] componentEntry = lineParts[1].Split(_split, 2, StringSplitOptions.Remov + 42187                                        if (componentEntry.Length < 1)  188                                        {  0189                                            throw new ArgumentException($"Unable to get component type information from   190                                        } - 40191                                        if (!operations.TryGetValue(componentEntry[0].TrimEnd(':', '='), out operation)) + 42191                                        if (!operations.TryGetValue(componentEntry[0].TrimEnd(':', '='), out operation))  192                                        {  0193                                            throw new ArgumentException($"Unknown component type used '{componentEntry[0  194                                        }  195 - 40196                                        operation.SetComponent(currentEntity, componentEntry.Length > 1 ? componentEntry - 40197                                        break; + 42196                                        operation.SetComponent(currentEntity, componentEntry.Length > 1 ? componentEntry + 42197                                        break;  198  199                                    case nameof(EntryType.ComponentSameAs):  4200                                        if (currentEntity.Equals(default)) @@ -471,7 +471,7 @@

D:\Pro  418} - +

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_TypeExtension.htm b/docs/coverage/DefaultEcs_TypeExtension.htm index a2a25c4e..a3a2e447 100644 --- a/docs/coverage/DefaultEcs_TypeExtension.htm +++ b/docs/coverage/DefaultEcs_TypeExtension.htm @@ -49,11 +49,11 @@

D:\Pr  6{  7    internal static class TypeExtension  8    { - 319        public static bool IsFlagType(this TypeInfo typeInfo) => typeInfo.IsValueType && !typeInfo.IsEnum && !typeInfo.I + 519        public static bool IsFlagType(this TypeInfo typeInfo) => typeInfo.IsValueType && !typeInfo.IsEnum && !typeInfo.I  10  11        public static bool IsUnmanaged(this TypeInfo typeInfo)  12        { - 12613            return typeInfo.IsEnum || (typeInfo.IsValueType && (typeInfo.IsPrimitive || typeInfo.DeclaredFields.Where(f  + 12713            return typeInfo.IsEnum || (typeInfo.IsValueType && (typeInfo.IsPrimitive || typeInfo.DeclaredFields.Where(f   14        }  15  3316        public static bool IsUnmanaged(this Type type) => type.GetTypeInfo().IsUnmanaged(); @@ -61,7 +61,7 @@

D:\Pr  18} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_UnmanagedComponentCommand_1.htm b/docs/coverage/DefaultEcs_UnmanagedComponentCommand_1.htm index 9b0b2990..eb35cd7a 100644 --- a/docs/coverage/DefaultEcs_UnmanagedComponentCommand_1.htm +++ b/docs/coverage/DefaultEcs_UnmanagedComponentCommand_1.htm @@ -63,7 +63,7 @@

 21} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_UnmanagedConverter_1.htm b/docs/coverage/DefaultEcs_UnmanagedConverter_1.htm index 65ca7058..364fcc95 100644 --- a/docs/coverage/DefaultEcs_UnmanagedConverter_1.htm +++ b/docs/coverage/DefaultEcs_UnmanagedConverter_1.htm @@ -52,12 +52,12 @@

 10  11        public static void Write(in T value, Stream stream, byte[] buffer, byte* bufferP)  12        { - 22913            if (sizeof(T) <= buffer.Length) + 23113            if (sizeof(T) <= buffer.Length)  14            { - 22815                *(T*)bufferP = value; + 23015                *(T*)bufferP = value;  16 - 22817                stream.Write(buffer, 0, sizeof(T)); - 22818            } + 23017                stream.Write(buffer, 0, sizeof(T)); + 23018            }  19            else  20            {  121                int count = 0; @@ -82,11 +82,11 @@

 40  41        public static T Read(Stream stream, byte[] buffer, byte* bufferP)  42        { - 22943            if (sizeof(T) <= buffer.Length) + 23143            if (sizeof(T) <= buffer.Length)  44            { - 22845                if (stream.Read(buffer, 0, sizeof(T)) == sizeof(T)) + 23045                if (stream.Read(buffer, 0, sizeof(T)) == sizeof(T))  46                { - 22847                    return *(T*)bufferP; + 23047                    return *(T*)bufferP;  48                }  49                else  50                { @@ -127,7 +127,7 @@

 85} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenAddedAttribute.htm b/docs/coverage/DefaultEcs_WhenAddedAttribute.htm index 612fce66..8994283a 100644 --- a/docs/coverage/DefaultEcs_WhenAddedAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenAddedAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenAddedEitherAttribute.htm b/docs/coverage/DefaultEcs_WhenAddedEitherAttribute.htm index 3acb650d..1477d169 100644 --- a/docs/coverage/DefaultEcs_WhenAddedEitherAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenAddedEitherAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenChangedAttribute.htm b/docs/coverage/DefaultEcs_WhenChangedAttribute.htm index fa972bb3..273b5848 100644 --- a/docs/coverage/DefaultEcs_WhenChangedAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenChangedAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenChangedEitherAttribute.htm b/docs/coverage/DefaultEcs_WhenChangedEitherAttribute.htm index 798b508e..732b47b6 100644 --- a/docs/coverage/DefaultEcs_WhenChangedEitherAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenChangedEitherAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenRemovedAttribute.htm b/docs/coverage/DefaultEcs_WhenRemovedAttribute.htm index 25fd16e8..07e852de 100644 --- a/docs/coverage/DefaultEcs_WhenRemovedAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenRemovedAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WhenRemovedEitherAttribute.htm b/docs/coverage/DefaultEcs_WhenRemovedEitherAttribute.htm index ac6bacef..05dc7b5d 100644 --- a/docs/coverage/DefaultEcs_WhenRemovedEitherAttribute.htm +++ b/docs/coverage/DefaultEcs_WhenRemovedEitherAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WithAttribute.htm b/docs/coverage/DefaultEcs_WithAttribute.htm index a9b78a4d..09de958c 100644 --- a/docs/coverage/DefaultEcs_WithAttribute.htm +++ b/docs/coverage/DefaultEcs_WithAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WithEitherAttribute.htm b/docs/coverage/DefaultEcs_WithEitherAttribute.htm index baa17b5f..36c7a06a 100644 --- a/docs/coverage/DefaultEcs_WithEitherAttribute.htm +++ b/docs/coverage/DefaultEcs_WithEitherAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WithoutAttribute.htm b/docs/coverage/DefaultEcs_WithoutAttribute.htm index b3c7b27b..539ac596 100644 --- a/docs/coverage/DefaultEcs_WithoutAttribute.htm +++ b/docs/coverage/DefaultEcs_WithoutAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WithoutEitherAttribute.htm b/docs/coverage/DefaultEcs_WithoutEitherAttribute.htm index ae1a7c8b..ecc2f94f 100644 --- a/docs/coverage/DefaultEcs_WithoutEitherAttribute.htm +++ b/docs/coverage/DefaultEcs_WithoutEitherAttribute.htm @@ -269,7 +269,7 @@

D:\Projec  229} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WorkerBarrier.htm b/docs/coverage/DefaultEcs_WorkerBarrier.htm index 441f085b..961076cb 100644 --- a/docs/coverage/DefaultEcs_WorkerBarrier.htm +++ b/docs/coverage/DefaultEcs_WorkerBarrier.htm @@ -132,7 +132,7 @@

D:\Pr  86} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_World.htm b/docs/coverage/DefaultEcs_World.htm index 039ac7cc..44d1e485 100644 --- a/docs/coverage/DefaultEcs_World.htm +++ b/docs/coverage/DefaultEcs_World.htm @@ -17,14 +17,14 @@

< Summary

Class:DefaultEcs.World Assembly:DefaultEcs File(s):D:\Projects\DefaultEcs\source\DefaultEcs\World.cs -Covered lines:71 -Uncovered lines:3 +Covered lines:72 +Uncovered lines:2 Coverable lines:74 Total lines:298 -Line coverage:95.9% (71 of 74) -Covered branches:22 +Line coverage:97.2% (72 of 74) +Covered branches:23 Total branches:26 -Branch coverage:84.6% (22 of 26) +Branch coverage:88.4% (23 of 26)

Metrics

@@ -32,7 +32,7 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage .cctor()10100%100% -.ctor(...)2091.66%50% +.ctor(...)20100%100% .ctor()10100%100% On(...)20100%100% On(...)60100%100% @@ -98,12 +98,12 @@

D:\Projects\DefaultEcs\sourc  41  42        #region Properties  43 - 10014544        internal int LastEntityId => _entityIdDispenser.LastInt; + 10014744        internal int LastEntityId => _entityIdDispenser.LastInt;  45  46        /// <summary>  47        /// Gets the maximum number of <see cref="Entity"/> this <see cref="World"/> can create.  48        /// </summary> - 20053149        public int MaxEntityCount => Info.MaxEntityCount; + 20053549        public int MaxEntityCount => Info.MaxEntityCount;  50  51        #endregion  52 @@ -125,27 +125,27 @@

D:\Projects\DefaultEcs\sourc  68        /// </summary>  69        /// <param name="maxEntityCount">The maximum number of <see cref="Entity"/> that can exist in this <see cref="Wo  70        /// <exception cref="ArgumentException"><paramref name="maxEntityCount"/> cannot be negative.</exception> - 13771        public World(int maxEntityCount) + 14071        public World(int maxEntityCount)  72        { - 13773            if (maxEntityCount < 0) + 14073            if (maxEntityCount < 0)  74            { - 075                throw new ArgumentException("Argument cannot be negative", nameof(maxEntityCount)); + 175                throw new ArgumentException("Argument cannot be negative", nameof(maxEntityCount));  76            }  77 - 13778            _entityIdDispenser = new IntDispenser(-1); - 13779            WorldId = _worldIdDispenser.GetFreeInt(); + 13978            _entityIdDispenser = new IntDispenser(-1); + 13979            WorldId = _worldIdDispenser.GetFreeInt();  80 - 13781            Info = new WorldInfo(maxEntityCount); + 13981            Info = new WorldInfo(maxEntityCount);  82 - 13783            lock (_lockObject) + 13983            lock (_lockObject)  84            { - 13785                ArrayExtension.EnsureLength(ref Infos, WorldId); + 13985                ArrayExtension.EnsureLength(ref Infos, WorldId);  86 - 13787                Infos[WorldId] = Info; - 13788            } + 13987                Infos[WorldId] = Info; + 13988            }  89 - 13790            this.Subscribe(this); - 13791        } + 13990            this.Subscribe(this); + 13991        }  92  93        /// <summary>  94        /// Initializes a new instance of the <see cref="World"/> class. @@ -162,9 +162,9 @@

D:\Projects\DefaultEcs\sourc  105        [Subscribe]  106        private void On(in EntityDisposingMessage message)  107        { - 32108            Info.EntityInfos[message.EntityId].Components.Clear(); - 32109            EntityDisposed?.Invoke(new Entity(WorldId, message.EntityId)); - 1110        } + 32108            EntityDisposed?.Invoke(new Entity(WorldId, message.EntityId)); + 32109            Info.EntityInfos[message.EntityId].Components.Clear(); + 32110        }  111  112        [Subscribe]  113        private void On(in EntityDisposedMessage message) @@ -218,20 +218,20 @@

D:\Projects\DefaultEcs\sourc  161        /// <exception cref="InvalidOperationException">Max number of <see cref="Entity"/> reached.</exception>  162        public Entity CreateEntity()  163        { - 100239164            int entityId = _entityIdDispenser.GetFreeInt(); + 100241164            int entityId = _entityIdDispenser.GetFreeInt();  165 - 100239166            if (entityId >= MaxEntityCount) + 100241166            if (entityId >= MaxEntityCount)  167            {  1168                throw new InvalidOperationException("Max number of Entity reached");  169            }  170 - 100238171            ArrayExtension.EnsureLength(ref Info.EntityInfos, entityId, MaxEntityCount); + 100240171            ArrayExtension.EnsureLength(ref Info.EntityInfos, entityId, MaxEntityCount);  172 - 100238173            Info.EntityInfos[entityId].Components[IsAliveFlag] = true; - 100238174            Info.EntityInfos[entityId].Components[IsEnabledFlag] = true; - 100238175            Publish(new EntityCreatedMessage(entityId)); + 100240173            Info.EntityInfos[entityId].Components[IsAliveFlag] = true; + 100240174            Info.EntityInfos[entityId].Components[IsEnabledFlag] = true; + 100240175            Publish(new EntityCreatedMessage(entityId));  176 - 100238177            return new Entity(WorldId, entityId); + 100240177            return new Entity(WorldId, entityId);  178        }  179  180        /// <summary> @@ -244,12 +244,12 @@

D:\Projects\DefaultEcs\sourc  187        /// <exception cref="ArgumentException"><paramref name="maxComponentCount"/> cannot be negative.</exception>  188        public bool SetMaximumComponentCount<T>(int maxComponentCount)  189        { - 32190            if (maxComponentCount < 0) + 35190            if (maxComponentCount < 0)  191            {  1192                throw new ArgumentException("Argument cannot be negative", nameof(maxComponentCount));  193            }  194 - 31195            return ComponentManager<T>.GetOrCreate(WorldId, maxComponentCount).MaxComponentCount == maxComponentCount; + 34195            return ComponentManager<T>.GetOrCreate(WorldId, maxComponentCount).MaxComponentCount == maxComponentCount;  196        }  197  198        /// <summary> @@ -281,14 +281,14 @@

D:\Projects\DefaultEcs\sourc  224        /// <returns>All the <see cref="Entity"/> of the current <see cref="World"/>.</returns>  225        public IEnumerable<Entity> GetAllEntities()  226        { - 200172227            for (int i = 0; i <= Math.Min(Info.EntityInfos.Length, LastEntityId); ++i) + 200176227            for (int i = 0; i <= Math.Min(Info.EntityInfos.Length, LastEntityId); ++i)  228            { - 100057229                if (Info.EntityInfos[i].Components[IsAliveFlag]) + 100058229                if (Info.EntityInfos[i].Components[IsAliveFlag])  230                { - 100045231                    yield return new Entity(WorldId, i); + 100046231                    yield return new Entity(WorldId, i);  232                }  233            } - 29234        } + 30234        }  235  236        /// <summary>  237        /// Calls on <paramref name="reader"/> with all the maximum number of component of the current <see cref="World" @@ -308,7 +308,7 @@

D:\Projects\DefaultEcs\sourc  251        /// <param name="action">The delegate to be called back.</param>  252        /// <returns>An <see cref="IDisposable"/> object used to unsubscribe.</returns>  253        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 460254        public IDisposable Subscribe<T>(ActionIn<T> action) => Publisher<T>.Subscribe(WorldId, action); + 464254        public IDisposable Subscribe<T>(ActionIn<T> action) => Publisher<T>.Subscribe(WorldId, action);  255  256        /// <summary>  257        /// Publishes a <typeparamref name="T"/> object. @@ -316,7 +316,7 @@

D:\Projects\DefaultEcs\sourc  259        /// <typeparam name="T">The type of the object to publish.</typeparam>  260        /// <param name="message">The object to publish.</param>  261        [MethodImpl(MethodImplOptions.AggressiveInlining)] - 100404262        public void Publish<T>(in T message) => Publisher<T>.Publish(WorldId, message); + 100408262        public void Publish<T>(in T message) => Publisher<T>.Publish(WorldId, message);  263  264        #endregion  265 @@ -328,17 +328,17 @@

D:\Projects\DefaultEcs\sourc  271        /// </summary>  272        public void Dispose()  273        { - 137274            lock (_lockObject) + 139274            lock (_lockObject)  275            { - 137276                Infos[WorldId] = null; - 137277            } + 139276                Infos[WorldId] = null; + 139277            }  278 - 137279            Publish(new ManagedResourceReleaseAllMessage()); - 137280            Publisher.Publish(0, new WorldDisposedMessage(WorldId)); - 137281            _worldIdDispenser.ReleaseInt(WorldId); + 139279            Publish(new ManagedResourceReleaseAllMessage()); + 139280            Publisher.Publish(0, new WorldDisposedMessage(WorldId)); + 139281            _worldIdDispenser.ReleaseInt(WorldId);  282 - 137283            GC.SuppressFinalize(this); - 137284        } + 139283            GC.SuppressFinalize(this); + 139284        }  285  286        #endregion  287 @@ -355,7 +355,7 @@

D:\Projects\DefaultEcs\sourc  298} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WorldDebugView.htm b/docs/coverage/DefaultEcs_WorldDebugView.htm index 380e8c80..d060a69a 100644 --- a/docs/coverage/DefaultEcs_WorldDebugView.htm +++ b/docs/coverage/DefaultEcs_WorldDebugView.htm @@ -105,7 +105,7 @@

D:\Pr  61} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WorldDisposedMessage.htm b/docs/coverage/DefaultEcs_WorldDisposedMessage.htm index 8f1e6e47..be0c183b 100644 --- a/docs/coverage/DefaultEcs_WorldDisposedMessage.htm +++ b/docs/coverage/DefaultEcs_WorldDisposedMessage.htm @@ -46,13 +46,13 @@

 6  7        public WorldDisposedMessage(int worldId)  8        { - 1379            WorldId = worldId; - 13710        } + 1399            WorldId = worldId; + 13910        }  11    }  12} -

+

Methods/Properties

diff --git a/docs/coverage/DefaultEcs_WorldInfo.htm b/docs/coverage/DefaultEcs_WorldInfo.htm index 9a9d014e..6501c0ab 100644 --- a/docs/coverage/DefaultEcs_WorldInfo.htm +++ b/docs/coverage/DefaultEcs_WorldInfo.htm @@ -48,17 +48,17 @@

D:\Projects\Def  8  9        public EntityInfo[] EntityInfos;  10 - 13711        public WorldInfo(int maxEntityCount) + 13911        public WorldInfo(int maxEntityCount)  12        { - 13713            MaxEntityCount = maxEntityCount; + 13913            MaxEntityCount = maxEntityCount;  14 - 13715            EntityInfos = EmptyArray<EntityInfo>.Value; - 13716        } + 13915            EntityInfos = EmptyArray<EntityInfo>.Value; + 13916        }  17    }  18} -

+

Methods/Properties

diff --git a/docs/coverage/index.htm b/docs/coverage/index.htm index 3babeb01..950d067e 100644 --- a/docs/coverage/index.htm +++ b/docs/coverage/index.htm @@ -14,19 +14,19 @@

Summary

-Generated on:24/08/2019 - 09:57:17 +Generated on:31/08/2019 - 19:20:56 Parser:OpenCoverParser Assemblies:1 Classes:85 Files:68 -Covered lines:1806 -Uncovered lines:208 -Coverable lines:2014 -Total lines:6946 -Line coverage:89.6% (1806 of 2014) -Covered branches:968 -Total branches:1183 -Branch coverage:81.8% (968 of 1183) +Covered lines:1824 +Uncovered lines:188 +Coverable lines:2012 +Total lines:6949 +Line coverage:90.6% (1824 of 2012) +Covered branches:988 +Total branches:1181 +Branch coverage:83.6% (988 of 1181)

Risk Hotspots

@@ -77,28 +77,28 @@

Coverage

NameCoveredUncoveredCoverableTotalLine coverageBranch coverage -DefaultEcs180620820141044789.6%
  
81.8%
  
+DefaultEcs182418820121045090.6%
  
83.6%
  
DefaultEcs.Command.EntityCommandPlayer055310%
 
 
DefaultEcs.Command.EntityCommandRecorder6066624090.9%
  
75%
  
DefaultEcs.Command.EntityRecord15015126100%
 
 
-DefaultEcs.Entity107411141596.3%
  
77.8%
  
-DefaultEcs.EntitySet7558024793.7%
  
94.7%
  
+DefaultEcs.Entity107411141596.3%
  
78.8%
  
+DefaultEcs.EntitySet80080247100%
 
100%
 
DefaultEcs.EntitySetBuilder1411715849589.2%
  
83.8%
  
DefaultEcs.EntitySetBuilderExtension551010350%
  
 
DefaultEcs.IPublisherExtension3413512297.1%
  
92.3%
  
-DefaultEcs.Resource.AResourceManager`24134417593.1%
  
62.5%
  
+DefaultEcs.Resource.AResourceManager`244044175100%
 
96.8%
  
DefaultEcs.Resource.ManagedResource`220227100%
 
 
DefaultEcs.Serialization.BinarySerializer8579227292.3%
  
58%
  
-DefaultEcs.Serialization.ISerializerExtension011540%
 
 
+DefaultEcs.Serialization.ISerializerExtension10154100%
 
 
DefaultEcs.Serialization.TextSerializer1173815541875.4%
  
68.9%
  
-DefaultEcs.System.AComponentSystem`2151169893.7%
  
100%
 
+DefaultEcs.System.AComponentSystem`21601698100%
 
100%
 
DefaultEcs.System.ActionSystem`190963100%
 
100%
 
-DefaultEcs.System.AEntitySystem`12833115590.3%
  
100%
 
-DefaultEcs.System.ASystem`1132159286.6%
  
100%
 
+DefaultEcs.System.AEntitySystem`131031155100%
 
100%
 
+DefaultEcs.System.ASystem`11301385100%
 
100%
 
DefaultEcs.System.ComponentAttribute404229100%
 
50%
  
DefaultEcs.System.ParallelSystem`11601687100%
 
81.2%
  
DefaultEcs.System.SequentialSystem`11201270100%
 
75%
  
-DefaultEcs.System.SystemRunner`127027107100%
 
81.2%
  
+DefaultEcs.System.SystemRunner`127027117100%
 
81.2%
  
DefaultEcs.System.WhenAddedAttribute0222290%
 
 
DefaultEcs.System.WhenAddedEitherAttribute0222290%
 
 
DefaultEcs.System.WhenChangedAttribute0222290%
 
 
@@ -118,11 +118,11 @@

Coverage

DefaultEcs.Technical.Command.Executer5105193100%
 
89.4%
  
DefaultEcs.Technical.Command.ManagedComponentCommand`170723100%
 
 
DefaultEcs.Technical.Command.UnmanagedComponentCommand`140421100%
 
 
-DefaultEcs.Technical.ComponentEnum32032109100%
 
91.3%
  
-DefaultEcs.Technical.ComponentFlag1101148100%
 
50%
  
+DefaultEcs.Technical.ComponentEnum32032109100%
 
95.4%
  
+DefaultEcs.Technical.ComponentFlag1101148100%
 
100%
 
DefaultEcs.Technical.ComponentLink30322100%
 
 
DefaultEcs.Technical.ComponentManager`12002079100%
 
100%
 
-DefaultEcs.Technical.ComponentPool`1951010527090.4%
  
83.8%
  
+DefaultEcs.Technical.ComponentPool`197810527092.3%
  
87%
  
DefaultEcs.Technical.Debug.EntityDebugView02020580%
 
0%
 
DefaultEcs.Technical.Debug.EntitySetDebugView044170%
 
 
DefaultEcs.Technical.Debug.WorldDebugView02121610%
 
0%
 
@@ -155,17 +155,17 @@

Coverage

DefaultEcs.Technical.Serialization.BinarySerializer.StringConverter221236195.6%
  
90%
  
DefaultEcs.Technical.Serialization.BinarySerializer.UnmanagedConverter`1302328593.7%
  
87.5%
  
DefaultEcs.Technical.Serialization.ObjectInitializer10133100%
 
 
-DefaultEcs.Technical.Serialization.TextSerializer.ComponentTypeWriter131145392.8%
  
75%
  
+DefaultEcs.Technical.Serialization.TextSerializer.ComponentTypeWriter1401453100%
 
100%
 
DefaultEcs.Technical.Serialization.TextSerializer.Converter26026427100%
 
100%
 
DefaultEcs.Technical.Serialization.TextSerializer.Converter`1164316742798.2%
  
89.5%
  
-DefaultEcs.Technical.Serialization.TextSerializer.EntityWriter3413510197.1%
  
95%
  
+DefaultEcs.Technical.Serialization.TextSerializer.EntityWriter35035101100%
 
100%
 
DefaultEcs.Technical.System.EntitySetBuilderFactory2202264100%
 
100%
 
DefaultEcs.Technical.System.WorkerBarrier2502586100%
 
100%
 
DefaultEcs.Technical.WorldInfo40418100%
 
 
-DefaultEcs.World7137429895.9%
  
84.6%
  
+DefaultEcs.World7227429897.2%
  
88.4%
  
-
+ \ No newline at end of file diff --git a/docs/coverage/main.js b/docs/coverage/main.js index 969efb54..bd0c0976 100644 --- a/docs/coverage/main.js +++ b/docs/coverage/main.js @@ -227,24 +227,24 @@ var assemblies = [ { "name": "DefaultEcs.Command.EntityCommandPlayer", "rp": "DefaultEcs_EntityCommandPlayer.htm", "cl": 0, "ucl": 5, "cal": 5, "tl": 31, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Command.EntityCommandRecorder", "rp": "DefaultEcs_EntityCommandRecorder.htm", "cl": 60, "ucl": 6, "cal": 66, "tl": 240, "ct": "LineCoverage", "mc": "-", "cb": 30, "tb": 40, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Command.EntityRecord", "rp": "DefaultEcs_EntityRecord.htm", "cl": 15, "ucl": 0, "cal": 15, "tl": 126, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Entity", "rp": "DefaultEcs_Entity.htm", "cl": 107, "ucl": 4, "cal": 111, "tl": 415, "ct": "LineCoverage", "mc": "-", "cb": 81, "tb": 104, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.EntitySet", "rp": "DefaultEcs_EntitySet.htm", "cl": 75, "ucl": 5, "cal": 80, "tl": 247, "ct": "LineCoverage", "mc": "-", "cb": 36, "tb": 38, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Entity", "rp": "DefaultEcs_Entity.htm", "cl": 107, "ucl": 4, "cal": 111, "tl": 415, "ct": "LineCoverage", "mc": "-", "cb": 82, "tb": 104, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.EntitySet", "rp": "DefaultEcs_EntitySet.htm", "cl": 80, "ucl": 0, "cal": 80, "tl": 247, "ct": "LineCoverage", "mc": "-", "cb": 38, "tb": 38, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.EntitySetBuilder", "rp": "DefaultEcs_EntitySetBuilder.htm", "cl": 141, "ucl": 17, "cal": 158, "tl": 495, "ct": "LineCoverage", "mc": "-", "cb": 151, "tb": 180, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.EntitySetBuilderExtension", "rp": "DefaultEcs_EntitySetBuilderExtension.htm", "cl": 5, "ucl": 5, "cal": 10, "tl": 103, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.IPublisherExtension", "rp": "DefaultEcs_IPublisherExtension.htm", "cl": 34, "ucl": 1, "cal": 35, "tl": 122, "ct": "LineCoverage", "mc": "-", "cb": 24, "tb": 26, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Resource.AResourceManager`2", "rp": "DefaultEcs_AResourceManager_2.htm", "cl": 41, "ucl": 3, "cal": 44, "tl": 175, "ct": "LineCoverage", "mc": "-", "cb": 20, "tb": 32, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Resource.AResourceManager`2", "rp": "DefaultEcs_AResourceManager_2.htm", "cl": 44, "ucl": 0, "cal": 44, "tl": 175, "ct": "LineCoverage", "mc": "-", "cb": 31, "tb": 32, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Resource.ManagedResource`2", "rp": "DefaultEcs_ManagedResource_2.htm", "cl": 2, "ucl": 0, "cal": 2, "tl": 27, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Serialization.BinarySerializer", "rp": "DefaultEcs_BinarySerializer.htm", "cl": 85, "ucl": 7, "cal": 92, "tl": 272, "ct": "LineCoverage", "mc": "-", "cb": 36, "tb": 62, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Serialization.ISerializerExtension", "rp": "DefaultEcs_ISerializerExtension.htm", "cl": 0, "ucl": 1, "cal": 1, "tl": 54, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Serialization.ISerializerExtension", "rp": "DefaultEcs_ISerializerExtension.htm", "cl": 1, "ucl": 0, "cal": 1, "tl": 54, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Serialization.TextSerializer", "rp": "DefaultEcs_TextSerializer.htm", "cl": 117, "ucl": 38, "cal": 155, "tl": 418, "ct": "LineCoverage", "mc": "-", "cb": 102, "tb": 148, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.System.AComponentSystem`2", "rp": "DefaultEcs_AComponentSystem_2.htm", "cl": 15, "ucl": 1, "cal": 16, "tl": 98, "ct": "LineCoverage", "mc": "-", "cb": 8, "tb": 8, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.System.AComponentSystem`2", "rp": "DefaultEcs_AComponentSystem_2.htm", "cl": 16, "ucl": 0, "cal": 16, "tl": 98, "ct": "LineCoverage", "mc": "-", "cb": 8, "tb": 8, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.ActionSystem`1", "rp": "DefaultEcs_ActionSystem_1.htm", "cl": 9, "ucl": 0, "cal": 9, "tl": 63, "ct": "LineCoverage", "mc": "-", "cb": 4, "tb": 4, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.System.AEntitySystem`1", "rp": "DefaultEcs_AEntitySystem_1.htm", "cl": 28, "ucl": 3, "cal": 31, "tl": 155, "ct": "LineCoverage", "mc": "-", "cb": 10, "tb": 10, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.System.ASystem`1", "rp": "DefaultEcs_ASystem_1.htm", "cl": 13, "ucl": 2, "cal": 15, "tl": 92, "ct": "LineCoverage", "mc": "-", "cb": 4, "tb": 4, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.System.AEntitySystem`1", "rp": "DefaultEcs_AEntitySystem_1.htm", "cl": 31, "ucl": 0, "cal": 31, "tl": 155, "ct": "LineCoverage", "mc": "-", "cb": 10, "tb": 10, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.System.ASystem`1", "rp": "DefaultEcs_ASystem_1.htm", "cl": 13, "ucl": 0, "cal": 13, "tl": 85, "ct": "LineCoverage", "mc": "-", "cb": 4, "tb": 4, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.ComponentAttribute", "rp": "DefaultEcs_ComponentAttribute.htm", "cl": 4, "ucl": 0, "cal": 4, "tl": 229, "ct": "LineCoverage", "mc": "-", "cb": 1, "tb": 2, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.ParallelSystem`1", "rp": "DefaultEcs_ParallelSystem_1.htm", "cl": 16, "ucl": 0, "cal": 16, "tl": 87, "ct": "LineCoverage", "mc": "-", "cb": 13, "tb": 16, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.SequentialSystem`1", "rp": "DefaultEcs_SequentialSystem_1.htm", "cl": 12, "ucl": 0, "cal": 12, "tl": 70, "ct": "LineCoverage", "mc": "-", "cb": 9, "tb": 12, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.System.SystemRunner`1", "rp": "DefaultEcs_SystemRunner_1.htm", "cl": 27, "ucl": 0, "cal": 27, "tl": 107, "ct": "LineCoverage", "mc": "-", "cb": 13, "tb": 16, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.System.SystemRunner`1", "rp": "DefaultEcs_SystemRunner_1.htm", "cl": 27, "ucl": 0, "cal": 27, "tl": 117, "ct": "LineCoverage", "mc": "-", "cb": 13, "tb": 16, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.WhenAddedAttribute", "rp": "DefaultEcs_WhenAddedAttribute.htm", "cl": 0, "ucl": 2, "cal": 2, "tl": 229, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.WhenAddedEitherAttribute", "rp": "DefaultEcs_WhenAddedEitherAttribute.htm", "cl": 0, "ucl": 2, "cal": 2, "tl": 229, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.System.WhenChangedAttribute", "rp": "DefaultEcs_WhenChangedAttribute.htm", "cl": 0, "ucl": 2, "cal": 2, "tl": 229, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, @@ -264,11 +264,11 @@ var assemblies = [ { "name": "DefaultEcs.Technical.Command.Executer", "rp": "DefaultEcs_Executer.htm", "cl": 51, "ucl": 0, "cal": 51, "tl": 93, "ct": "LineCoverage", "mc": "-", "cb": 17, "tb": 19, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Command.ManagedComponentCommand`1", "rp": "DefaultEcs_ManagedComponentCommand_1.htm", "cl": 7, "ucl": 0, "cal": 7, "tl": 23, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Command.UnmanagedComponentCommand`1", "rp": "DefaultEcs_UnmanagedComponentCommand_1.htm", "cl": 4, "ucl": 0, "cal": 4, "tl": 21, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Technical.ComponentEnum", "rp": "DefaultEcs_ComponentEnum.htm", "cl": 32, "ucl": 0, "cal": 32, "tl": 109, "ct": "LineCoverage", "mc": "-", "cb": 42, "tb": 46, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Technical.ComponentFlag", "rp": "DefaultEcs_ComponentFlag.htm", "cl": 11, "ucl": 0, "cal": 11, "tl": 48, "ct": "LineCoverage", "mc": "-", "cb": 1, "tb": 2, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Technical.ComponentEnum", "rp": "DefaultEcs_ComponentEnum.htm", "cl": 32, "ucl": 0, "cal": 32, "tl": 109, "ct": "LineCoverage", "mc": "-", "cb": 42, "tb": 44, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Technical.ComponentFlag", "rp": "DefaultEcs_ComponentFlag.htm", "cl": 11, "ucl": 0, "cal": 11, "tl": 48, "ct": "LineCoverage", "mc": "-", "cb": 2, "tb": 2, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.ComponentLink", "rp": "DefaultEcs_ComponentLink.htm", "cl": 3, "ucl": 0, "cal": 3, "tl": 22, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.ComponentManager`1", "rp": "DefaultEcs_ComponentManager_1.htm", "cl": 20, "ucl": 0, "cal": 20, "tl": 79, "ct": "LineCoverage", "mc": "-", "cb": 10, "tb": 10, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Technical.ComponentPool`1", "rp": "DefaultEcs_ComponentPool_1.htm", "cl": 95, "ucl": 10, "cal": 105, "tl": 270, "ct": "LineCoverage", "mc": "-", "cb": 52, "tb": 62, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Technical.ComponentPool`1", "rp": "DefaultEcs_ComponentPool_1.htm", "cl": 97, "ucl": 8, "cal": 105, "tl": 270, "ct": "LineCoverage", "mc": "-", "cb": 54, "tb": 62, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Debug.EntityDebugView", "rp": "DefaultEcs_EntityDebugView.htm", "cl": 0, "ucl": 20, "cal": 20, "tl": 58, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 2, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Debug.EntitySetDebugView", "rp": "DefaultEcs_EntitySetDebugView.htm", "cl": 0, "ucl": 4, "cal": 4, "tl": 17, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Debug.WorldDebugView", "rp": "DefaultEcs_WorldDebugView.htm", "cl": 0, "ucl": 21, "cal": 21, "tl": 61, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 2, "lch": [], "bch": [], "hc": [] }, @@ -301,14 +301,14 @@ var assemblies = [ { "name": "DefaultEcs.Technical.Serialization.BinarySerializer.StringConverter", "rp": "DefaultEcs_StringConverter.htm", "cl": 22, "ucl": 1, "cal": 23, "tl": 61, "ct": "LineCoverage", "mc": "-", "cb": 9, "tb": 10, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Serialization.BinarySerializer.UnmanagedConverter`1", "rp": "DefaultEcs_UnmanagedConverter_1.htm", "cl": 30, "ucl": 2, "cal": 32, "tl": 85, "ct": "LineCoverage", "mc": "-", "cb": 14, "tb": 16, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Serialization.ObjectInitializer", "rp": "DefaultEcs_ObjectInitializer.htm", "cl": 1, "ucl": 0, "cal": 1, "tl": 33, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Technical.Serialization.TextSerializer.ComponentTypeWriter", "rp": "DefaultEcs_ComponentTypeWriter2.htm", "cl": 13, "ucl": 1, "cal": 14, "tl": 53, "ct": "LineCoverage", "mc": "-", "cb": 3, "tb": 4, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Technical.Serialization.TextSerializer.ComponentTypeWriter", "rp": "DefaultEcs_ComponentTypeWriter2.htm", "cl": 14, "ucl": 0, "cal": 14, "tl": 53, "ct": "LineCoverage", "mc": "-", "cb": 4, "tb": 4, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Serialization.TextSerializer.Converter", "rp": "DefaultEcs_Converter2.htm", "cl": 26, "ucl": 0, "cal": 26, "tl": 427, "ct": "LineCoverage", "mc": "-", "cb": 12, "tb": 12, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.Serialization.TextSerializer.Converter`1", "rp": "DefaultEcs_Converter_12.htm", "cl": 164, "ucl": 3, "cal": 167, "tl": 427, "ct": "LineCoverage", "mc": "-", "cb": 86, "tb": 96, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.Technical.Serialization.TextSerializer.EntityWriter", "rp": "DefaultEcs_EntityWriter2.htm", "cl": 34, "ucl": 1, "cal": 35, "tl": 101, "ct": "LineCoverage", "mc": "-", "cb": 19, "tb": 20, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.Technical.Serialization.TextSerializer.EntityWriter", "rp": "DefaultEcs_EntityWriter2.htm", "cl": 35, "ucl": 0, "cal": 35, "tl": 101, "ct": "LineCoverage", "mc": "-", "cb": 20, "tb": 20, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.System.EntitySetBuilderFactory", "rp": "DefaultEcs_EntitySetBuilderFactory.htm", "cl": 22, "ucl": 0, "cal": 22, "tl": 64, "ct": "LineCoverage", "mc": "-", "cb": 2, "tb": 2, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.System.WorkerBarrier", "rp": "DefaultEcs_WorkerBarrier.htm", "cl": 25, "ucl": 0, "cal": 25, "tl": 86, "ct": "LineCoverage", "mc": "-", "cb": 6, "tb": 6, "lch": [], "bch": [], "hc": [] }, { "name": "DefaultEcs.Technical.WorldInfo", "rp": "DefaultEcs_WorldInfo.htm", "cl": 4, "ucl": 0, "cal": 4, "tl": 18, "ct": "LineCoverage", "mc": "-", "cb": 0, "tb": 0, "lch": [], "bch": [], "hc": [] }, - { "name": "DefaultEcs.World", "rp": "DefaultEcs_World.htm", "cl": 71, "ucl": 3, "cal": 74, "tl": 298, "ct": "LineCoverage", "mc": "-", "cb": 22, "tb": 26, "lch": [], "bch": [], "hc": [] }, + { "name": "DefaultEcs.World", "rp": "DefaultEcs_World.htm", "cl": 72, "ucl": 2, "cal": 74, "tl": 298, "ct": "LineCoverage", "mc": "-", "cb": 23, "tb": 26, "lch": [], "bch": [], "hc": [] }, ]}, ]; diff --git a/documentation/RELEASENOTE.md b/documentation/RELEASENOTE.md index c3c9ad69..ecda6123 100644 --- a/documentation/RELEASENOTE.md +++ b/documentation/RELEASENOTE.md @@ -1,3 +1,16 @@ +## DefaultEcs 0.12.0 +breaking change: +renamed EntitySetBuilder.WithAny and WithAny attribute to WithEither +removed some methods from EntitySetBuilderExtension, Either methods stops at 3 components types but it is easy to add more if needed + +added WithoutEither filter for EntitySet +added WhenAddedEither filter for EntitySet +added WhenChangedEither filter for EntitySet +added WhenRemovedEither filter for EntitySet +changed BinarySerializer Exception to EndOfStreamException + +[nuget package](https://www.nuget.org/packages/DefaultEcs/0.12.0) + ## DefaultEcs 0.11.0 updated System.Memory reference enhanced debugging experience on World, Entity and EntitySet diff --git a/documentation/api/DefaultEcs-EntitySetBuilder-WhenAddedEither(System-Type--).md b/documentation/api/DefaultEcs-EntitySetBuilder-WhenAddedEither(System-Type--).md new file mode 100644 index 00000000..1c0e9adf --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilder-WhenAddedEither(System-Type--).md @@ -0,0 +1,12 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') +## WhenAddedEither(System.Type[]) `method` +Makes a rule to observe [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when one component of the given types is added. +### Parameters + + +`componentTypes` + +The types of component. +### Returns +The current [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilder-WhenChangedEither(System-Type--).md b/documentation/api/DefaultEcs-EntitySetBuilder-WhenChangedEither(System-Type--).md new file mode 100644 index 00000000..90520360 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilder-WhenChangedEither(System-Type--).md @@ -0,0 +1,12 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') +## WhenChangedEither(System.Type[]) `method` +Makes a rule to observe [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when one component of the given types is changed. +### Parameters + + +`componentTypes` + +The types of component. +### Returns +The current [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilder-WhenRemovedEither(System-Type--).md b/documentation/api/DefaultEcs-EntitySetBuilder-WhenRemovedEither(System-Type--).md new file mode 100644 index 00000000..30f544f4 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilder-WhenRemovedEither(System-Type--).md @@ -0,0 +1,12 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') +## WhenRemovedEither(System.Type[]) `method` +Makes a rule to observe [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when one component of the given types is removed. +### Parameters + + +`componentTypes` + +The types of component. +### Returns +The current [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilder-WithAny(System-Type--).md b/documentation/api/DefaultEcs-EntitySetBuilder-WithEither(System-Type--).md similarity index 79% rename from documentation/api/DefaultEcs-EntitySetBuilder-WithAny(System-Type--).md rename to documentation/api/DefaultEcs-EntitySetBuilder-WithEither(System-Type--).md index 02f0cb4e..c3e2f21d 100644 --- a/documentation/api/DefaultEcs-EntitySetBuilder-WithAny(System-Type--).md +++ b/documentation/api/DefaultEcs-EntitySetBuilder-WithEither(System-Type--).md @@ -1,10 +1,10 @@ #### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') ### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') -## WithAny(System.Type[]) `method` +## WithEither(System.Type[]) `method` Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of the given types. ### Parameters - + `componentTypes` The types of component. diff --git a/documentation/api/DefaultEcs-EntitySetBuilder-WithoutEither(System-Type--).md b/documentation/api/DefaultEcs-EntitySetBuilder-WithoutEither(System-Type--).md new file mode 100644 index 00000000..0afa3bd1 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilder-WithoutEither(System-Type--).md @@ -0,0 +1,12 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') +## WithoutEither(System.Type[]) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') without at least one component of the given types. +### Parameters + + +`componentTypes` + +The types of component. +### Returns +The current [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilder.md b/documentation/api/DefaultEcs-EntitySetBuilder.md index a2bb6c0e..32a49f0f 100644 --- a/documentation/api/DefaultEcs-EntitySetBuilder.md +++ b/documentation/api/DefaultEcs-EntitySetBuilder.md @@ -6,12 +6,16 @@ Represent an helper object to create an [EntitySet](./DefaultEcs-EntitySet.md 'D - [Build()](./DefaultEcs-EntitySetBuilder-Build().md 'DefaultEcs.EntitySetBuilder.Build()') - [WhenAdded<T>()](./DefaultEcs-EntitySetBuilder-WhenAdded-T-().md 'DefaultEcs.EntitySetBuilder.WhenAdded<T>()') - [WhenAdded(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenAdded(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenAdded(System.Type[])') +- [WhenAddedEither(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenAddedEither(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenAddedEither(System.Type[])') - [WhenChanged<T>()](./DefaultEcs-EntitySetBuilder-WhenChanged-T-().md 'DefaultEcs.EntitySetBuilder.WhenChanged<T>()') - [WhenChanged(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenChanged(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenChanged(System.Type[])') +- [WhenChangedEither(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenChangedEither(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenChangedEither(System.Type[])') - [WhenRemoved<T>()](./DefaultEcs-EntitySetBuilder-WhenRemoved-T-().md 'DefaultEcs.EntitySetBuilder.WhenRemoved<T>()') - [WhenRemoved(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenRemoved(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenRemoved(System.Type[])') +- [WhenRemovedEither(System.Type[])](./DefaultEcs-EntitySetBuilder-WhenRemovedEither(System-Type--).md 'DefaultEcs.EntitySetBuilder.WhenRemovedEither(System.Type[])') - [With<T>()](./DefaultEcs-EntitySetBuilder-With-T-().md 'DefaultEcs.EntitySetBuilder.With<T>()') - [With(System.Type[])](./DefaultEcs-EntitySetBuilder-With(System-Type--).md 'DefaultEcs.EntitySetBuilder.With(System.Type[])') -- [WithAny(System.Type[])](./DefaultEcs-EntitySetBuilder-WithAny(System-Type--).md 'DefaultEcs.EntitySetBuilder.WithAny(System.Type[])') +- [WithEither(System.Type[])](./DefaultEcs-EntitySetBuilder-WithEither(System-Type--).md 'DefaultEcs.EntitySetBuilder.WithEither(System.Type[])') - [Without<T>()](./DefaultEcs-EntitySetBuilder-Without-T-().md 'DefaultEcs.EntitySetBuilder.Without<T>()') - [Without(System.Type[])](./DefaultEcs-EntitySetBuilder-Without(System-Type--).md 'DefaultEcs.EntitySetBuilder.Without(System.Type[])') +- [WithoutEither(System.Type[])](./DefaultEcs-EntitySetBuilder-WithoutEither(System-Type--).md 'DefaultEcs.EntitySetBuilder.WithoutEither(System.Type[])') diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..e13a0560 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,23 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenAddedEither<T1, T2>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T2') is added. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..98de30c7 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,28 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3') is added. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. + + +`T3` + +The third type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..c311fadb --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,23 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenChangedEither<T1, T2>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T2') is changed. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..deeb662e --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,28 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3') is changed. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. + + +`T3` + +The third type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..19df883d --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,23 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenRemovedEither<T1, T2>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2>(DefaultEcs.EntitySetBuilder).T2') is removed. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..2deaeb7f --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,28 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') when at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3') is removed. +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. + + +`T3` + +The third type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder).md deleted file mode 100644 index 31a98ae3..00000000 --- a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder).md +++ /dev/null @@ -1,23 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') -## WithAny<T1, T2>(DefaultEcs.EntitySetBuilder) `method` -Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2>(DefaultEcs.EntitySetBuilder).T2'). -### Type parameters - - -`T1` - -The first type of component. - - -`T2` - -The second type of component. -### Parameters - - -`builder` - -The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. -### Returns -The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md deleted file mode 100644 index d2a70a03..00000000 --- a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md +++ /dev/null @@ -1,28 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') -## WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` -Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3'). -### Type parameters - - -`T1` - -The first type of component. - - -`T2` - -The second type of component. - - -`T3` - -The third type of component. -### Parameters - - -`builder` - -The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. -### Returns -The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder).md deleted file mode 100644 index 40045e2f..00000000 --- a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder).md +++ /dev/null @@ -1,33 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') -## WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder) `method` -Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder).T2'), [T3](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder).T3') or [T4](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder)-T4 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder).T4'). -### Type parameters - - -`T1` - -The first type of component. - - -`T2` - -The second type of component. - - -`T3` - -The third type of component. - - -`T4` - -The fourth type of component. -### Parameters - - -`builder` - -The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. -### Returns -The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder).md deleted file mode 100644 index a78f0d2f..00000000 --- a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder).md +++ /dev/null @@ -1,38 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') -## WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder) `method` -Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder).T2'), [T3](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder).T3'), [T4](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder)-T4 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder).T4') or [T5](#DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder)-T5 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder).T5'). -### Type parameters - - -`T1` - -The first type of component. - - -`T2` - -The second type of component. - - -`T3` - -The third type of component. - - -`T4` - -The fourth type of component. - - -`T5` - -The fith type of component. -### Parameters - - -`builder` - -The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. -### Returns -The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..bf0e3774 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,23 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WithEither<T1, T2>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2>(DefaultEcs.EntitySetBuilder).T2'). +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..520d164b --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,28 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') with at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3'). +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. + + +`T3` + +The third type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..f9d195a8 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,23 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WithoutEither<T1, T2>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') without at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2>(DefaultEcs.EntitySetBuilder).T1') or [T2](#DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2>(DefaultEcs.EntitySetBuilder).T2'). +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md new file mode 100644 index 00000000..ec2f1560 --- /dev/null +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md @@ -0,0 +1,28 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs](./DefaultEcs.md#DefaultEcs 'DefaultEcs').[EntitySetBuilderExtension](./DefaultEcs-EntitySetBuilderExtension.md 'DefaultEcs.EntitySetBuilderExtension') +## WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder) `method` +Makes a rule to obsverve [Entity](./DefaultEcs-Entity.md 'DefaultEcs.Entity') without at least one component of type [T1](#DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T1 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T1'), [T2](#DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T2 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T2') or [T3](#DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder)-T3 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder).T3'). +### Type parameters + + +`T1` + +The first type of component. + + +`T2` + +The second type of component. + + +`T3` + +The third type of component. +### Parameters + + +`builder` + +The [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') on which to create the rule. +### Returns +The given [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder'). diff --git a/documentation/api/DefaultEcs-EntitySetBuilderExtension.md b/documentation/api/DefaultEcs-EntitySetBuilderExtension.md index 5858a65b..465e57af 100644 --- a/documentation/api/DefaultEcs-EntitySetBuilderExtension.md +++ b/documentation/api/DefaultEcs-EntitySetBuilderExtension.md @@ -3,7 +3,13 @@ ## EntitySetBuilderExtension `type` Provides set of static methods to create more easily rules on a [EntitySetBuilder](./DefaultEcs-EntitySetBuilder.md 'DefaultEcs.EntitySetBuilder') instance. ### Methods -- [WithAny<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2>(DefaultEcs.EntitySetBuilder)') -- [WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') -- [WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4>(DefaultEcs.EntitySetBuilder)') -- [WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithAny-T1-_T2-_T3-_T4-_T5-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithAny<T1, T2, T3, T4, T5>(DefaultEcs.EntitySetBuilder)') +- [WhenAddedEither<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2>(DefaultEcs.EntitySetBuilder)') +- [WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenAddedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenAddedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') +- [WhenChangedEither<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2>(DefaultEcs.EntitySetBuilder)') +- [WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenChangedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenChangedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') +- [WhenRemovedEither<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2>(DefaultEcs.EntitySetBuilder)') +- [WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WhenRemovedEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WhenRemovedEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') +- [WithEither<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2>(DefaultEcs.EntitySetBuilder)') +- [WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') +- [WithoutEither<T1, T2>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2>(DefaultEcs.EntitySetBuilder)') +- [WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)](./DefaultEcs-EntitySetBuilderExtension-WithoutEither-T1-_T2-_T3-(DefaultEcs-EntitySetBuilder).md 'DefaultEcs.EntitySetBuilderExtension.WithoutEither<T1, T2, T3>(DefaultEcs.EntitySetBuilder)') diff --git a/documentation/api/DefaultEcs-System-ASystem-T---ctor().md b/documentation/api/DefaultEcs-System-ASystem-T---ctor().md deleted file mode 100644 index 4bab25c1..00000000 --- a/documentation/api/DefaultEcs-System-ASystem-T---ctor().md +++ /dev/null @@ -1,4 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ASystem<T>](./DefaultEcs-System-ASystem-T-.md 'DefaultEcs.System.ASystem<T>') -## #ctor() `constructor` -Initialise a new instance of the [ASystem<T>](./DefaultEcs-System-ASystem-T-.md 'DefaultEcs.System.ASystem<T>') class. diff --git a/documentation/api/DefaultEcs-System-ASystem-T-.md b/documentation/api/DefaultEcs-System-ASystem-T-.md index 959ca125..8f2944b1 100644 --- a/documentation/api/DefaultEcs-System-ASystem-T-.md +++ b/documentation/api/DefaultEcs-System-ASystem-T-.md @@ -9,7 +9,6 @@ Represents a base class to process updates, supporting a [SystemRunner<T>] The type of the object used as state to update the system. ### Constructors -- [#ctor()](./DefaultEcs-System-ASystem-T---ctor().md 'DefaultEcs.System.ASystem<T>.#ctor()') - [#ctor(DefaultEcs.System.SystemRunner<T>)](./DefaultEcs-System-ASystem-T---ctor(DefaultEcs-System-SystemRunner-T-).md 'DefaultEcs.System.ASystem<T>.#ctor(DefaultEcs.System.SystemRunner<T>)') ### Properties - [IsEnabled](./DefaultEcs-System-ASystem-T--IsEnabled.md 'DefaultEcs.System.ASystem<T>.IsEnabled') diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType-WhenAddedEither.md b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenAddedEither.md new file mode 100644 index 00000000..54712b51 --- /dev/null +++ b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenAddedEither.md @@ -0,0 +1,4 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ComponentFilterType](./DefaultEcs-System-ComponentFilterType.md 'DefaultEcs.System.ComponentFilterType') +## WhenAddedEither `field` +At least one of the given component types is added. diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType-WhenChangedEither.md b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenChangedEither.md new file mode 100644 index 00000000..a46f5f3a --- /dev/null +++ b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenChangedEither.md @@ -0,0 +1,4 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ComponentFilterType](./DefaultEcs-System-ComponentFilterType.md 'DefaultEcs.System.ComponentFilterType') +## WhenChangedEither `field` +At least one of the given component types is changed. diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType-WhenRemovedEither.md b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenRemovedEither.md new file mode 100644 index 00000000..8d39dc7f --- /dev/null +++ b/documentation/api/DefaultEcs-System-ComponentFilterType-WhenRemovedEither.md @@ -0,0 +1,4 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ComponentFilterType](./DefaultEcs-System-ComponentFilterType.md 'DefaultEcs.System.ComponentFilterType') +## WhenRemovedEither `field` +At least one of the given component types is removed. diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType-WithAny.md b/documentation/api/DefaultEcs-System-ComponentFilterType-WithEither.md similarity index 93% rename from documentation/api/DefaultEcs-System-ComponentFilterType-WithAny.md rename to documentation/api/DefaultEcs-System-ComponentFilterType-WithEither.md index 7374c2ec..2a4b1839 100644 --- a/documentation/api/DefaultEcs-System-ComponentFilterType-WithAny.md +++ b/documentation/api/DefaultEcs-System-ComponentFilterType-WithEither.md @@ -1,4 +1,4 @@ #### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') ### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ComponentFilterType](./DefaultEcs-System-ComponentFilterType.md 'DefaultEcs.System.ComponentFilterType') -## WithAny `field` +## WithEither `field` At least one of the given component types should be present. diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType-WithoutEither.md b/documentation/api/DefaultEcs-System-ComponentFilterType-WithoutEither.md new file mode 100644 index 00000000..b90a4a7a --- /dev/null +++ b/documentation/api/DefaultEcs-System-ComponentFilterType-WithoutEither.md @@ -0,0 +1,4 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[ComponentFilterType](./DefaultEcs-System-ComponentFilterType.md 'DefaultEcs.System.ComponentFilterType') +## WithoutEither `field` +At least one of the given component types should not be present. diff --git a/documentation/api/DefaultEcs-System-ComponentFilterType.md b/documentation/api/DefaultEcs-System-ComponentFilterType.md index 84f1bc73..11ea2f3e 100644 --- a/documentation/api/DefaultEcs-System-ComponentFilterType.md +++ b/documentation/api/DefaultEcs-System-ComponentFilterType.md @@ -4,8 +4,12 @@ Specifies which filter rule should be applied when using a [ComponentAttribute](./DefaultEcs-System-ComponentAttribute.md 'DefaultEcs.System.ComponentAttribute'). ### Fields - [WhenAdded](./DefaultEcs-System-ComponentFilterType-WhenAdded.md 'DefaultEcs.System.ComponentFilterType.WhenAdded') +- [WhenAddedEither](./DefaultEcs-System-ComponentFilterType-WhenAddedEither.md 'DefaultEcs.System.ComponentFilterType.WhenAddedEither') - [WhenChanged](./DefaultEcs-System-ComponentFilterType-WhenChanged.md 'DefaultEcs.System.ComponentFilterType.WhenChanged') +- [WhenChangedEither](./DefaultEcs-System-ComponentFilterType-WhenChangedEither.md 'DefaultEcs.System.ComponentFilterType.WhenChangedEither') - [WhenRemoved](./DefaultEcs-System-ComponentFilterType-WhenRemoved.md 'DefaultEcs.System.ComponentFilterType.WhenRemoved') +- [WhenRemovedEither](./DefaultEcs-System-ComponentFilterType-WhenRemovedEither.md 'DefaultEcs.System.ComponentFilterType.WhenRemovedEither') - [With](./DefaultEcs-System-ComponentFilterType-With.md 'DefaultEcs.System.ComponentFilterType.With') -- [WithAny](./DefaultEcs-System-ComponentFilterType-WithAny.md 'DefaultEcs.System.ComponentFilterType.WithAny') +- [WithEither](./DefaultEcs-System-ComponentFilterType-WithEither.md 'DefaultEcs.System.ComponentFilterType.WithEither') - [Without](./DefaultEcs-System-ComponentFilterType-Without.md 'DefaultEcs.System.ComponentFilterType.Without') +- [WithoutEither](./DefaultEcs-System-ComponentFilterType-WithoutEither.md 'DefaultEcs.System.ComponentFilterType.WithoutEither') diff --git a/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute--ctor(System-Type--).md new file mode 100644 index 00000000..61a3949b --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute--ctor(System-Type--).md @@ -0,0 +1,10 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WhenAddedEitherAttribute](./DefaultEcs-System-WhenAddedEitherAttribute.md 'DefaultEcs.System.WhenAddedEitherAttribute') +## #ctor(System.Type[]) `constructor` +Initialize a new instance of the [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') type. +### Parameters + + +`componentTypes` + +The types of the component to react to their addition. diff --git a/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute.md b/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute.md new file mode 100644 index 00000000..8565029e --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenAddedEitherAttribute.md @@ -0,0 +1,6 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') +## WhenAddedEitherAttribute `type` +Represents a group of component types to react to at least one of their addition when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. +### Constructors +- [#ctor(System.Type[])](./DefaultEcs-System-WhenAddedEitherAttribute--ctor(System-Type--).md 'DefaultEcs.System.WhenAddedEitherAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute--ctor(System-Type--).md new file mode 100644 index 00000000..99cd91cb --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute--ctor(System-Type--).md @@ -0,0 +1,10 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WhenChangedEitherAttribute](./DefaultEcs-System-WhenChangedEitherAttribute.md 'DefaultEcs.System.WhenChangedEitherAttribute') +## #ctor(System.Type[]) `constructor` +Initialize a new instance of the [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') type. +### Parameters + + +`componentTypes` + +The types of the component to react to their change. diff --git a/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute.md b/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute.md new file mode 100644 index 00000000..3fc80715 --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenChangedEitherAttribute.md @@ -0,0 +1,6 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') +## WhenChangedEitherAttribute `type` +Represents a group of component types to react to at least one of their change when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. +### Constructors +- [#ctor(System.Type[])](./DefaultEcs-System-WhenChangedEitherAttribute--ctor(System-Type--).md 'DefaultEcs.System.WhenChangedEitherAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute--ctor(System-Type--).md new file mode 100644 index 00000000..6a19f9ce --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute--ctor(System-Type--).md @@ -0,0 +1,10 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WhenRemovedEitherAttribute](./DefaultEcs-System-WhenRemovedEitherAttribute.md 'DefaultEcs.System.WhenRemovedEitherAttribute') +## #ctor(System.Type[]) `constructor` +Initialize a new instance of the [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') type. +### Parameters + + +`componentTypes` + +The types of the component to react to their change. diff --git a/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute.md b/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute.md new file mode 100644 index 00000000..257df748 --- /dev/null +++ b/documentation/api/DefaultEcs-System-WhenRemovedEitherAttribute.md @@ -0,0 +1,6 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') +## WhenRemovedEitherAttribute `type` +Represents a group of component types to react to at least one of their deletion when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. +### Constructors +- [#ctor(System.Type[])](./DefaultEcs-System-WhenRemovedEitherAttribute--ctor(System-Type--).md 'DefaultEcs.System.WhenRemovedEitherAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs-System-WithAnyAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WithAnyAttribute--ctor(System-Type--).md deleted file mode 100644 index ca2501bf..00000000 --- a/documentation/api/DefaultEcs-System-WithAnyAttribute--ctor(System-Type--).md +++ /dev/null @@ -1,10 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WithAnyAttribute](./DefaultEcs-System-WithAnyAttribute.md 'DefaultEcs.System.WithAnyAttribute') -## #ctor(System.Type[]) `constructor` -Initialize a new instance of the [WithAnyAttribute](./DefaultEcs-System-WithAnyAttribute.md 'DefaultEcs.System.WithAnyAttribute') type. -### Parameters - - -`componentTypes` - -The types of the component to include. diff --git a/documentation/api/DefaultEcs-System-WithAnyAttribute.md b/documentation/api/DefaultEcs-System-WithAnyAttribute.md deleted file mode 100644 index b2631c00..00000000 --- a/documentation/api/DefaultEcs-System-WithAnyAttribute.md +++ /dev/null @@ -1,6 +0,0 @@ -#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') -### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') -## WithAnyAttribute `type` -Represents a group of component types to include when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. -### Constructors -- [#ctor(System.Type[])](./DefaultEcs-System-WithAnyAttribute--ctor(System-Type--).md 'DefaultEcs.System.WithAnyAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs-System-WithEitherAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WithEitherAttribute--ctor(System-Type--).md new file mode 100644 index 00000000..973098a6 --- /dev/null +++ b/documentation/api/DefaultEcs-System-WithEitherAttribute--ctor(System-Type--).md @@ -0,0 +1,10 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') +## #ctor(System.Type[]) `constructor` +Initialize a new instance of the [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') type. +### Parameters + + +`componentTypes` + +The types of the component to include. diff --git a/documentation/api/DefaultEcs-System-WithEitherAttribute.md b/documentation/api/DefaultEcs-System-WithEitherAttribute.md new file mode 100644 index 00000000..9d63840f --- /dev/null +++ b/documentation/api/DefaultEcs-System-WithEitherAttribute.md @@ -0,0 +1,6 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') +## WithEitherAttribute `type` +Represents a group of component types which at least one should be present when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. +### Constructors +- [#ctor(System.Type[])](./DefaultEcs-System-WithEitherAttribute--ctor(System-Type--).md 'DefaultEcs.System.WithEitherAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs-System-WithoutEitherAttribute--ctor(System-Type--).md b/documentation/api/DefaultEcs-System-WithoutEitherAttribute--ctor(System-Type--).md new file mode 100644 index 00000000..070031eb --- /dev/null +++ b/documentation/api/DefaultEcs-System-WithoutEitherAttribute--ctor(System-Type--).md @@ -0,0 +1,10 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System').[WithoutEitherAttribute](./DefaultEcs-System-WithoutEitherAttribute.md 'DefaultEcs.System.WithoutEitherAttribute') +## #ctor(System.Type[]) `constructor` +Initialize a new instance of the [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') type. +### Parameters + + +`componentTypes` + +The types of the component to exclude. diff --git a/documentation/api/DefaultEcs-System-WithoutEitherAttribute.md b/documentation/api/DefaultEcs-System-WithoutEitherAttribute.md new file mode 100644 index 00000000..4eccbd5a --- /dev/null +++ b/documentation/api/DefaultEcs-System-WithoutEitherAttribute.md @@ -0,0 +1,6 @@ +#### [DefaultEcs](./DefaultEcs.md 'DefaultEcs') +### [DefaultEcs.System](./DefaultEcs.md#DefaultEcs-System 'DefaultEcs.System') +## WithoutEitherAttribute `type` +Represents a group of component types which at least one should not be present when building the inner [EntitySet](./DefaultEcs-EntitySet.md 'DefaultEcs.EntitySet') of [AEntitySystem<T>](./DefaultEcs-System-AEntitySystem-T-.md 'DefaultEcs.System.AEntitySystem<T>') when giving a [World](./DefaultEcs-World.md 'DefaultEcs.World') instance. +### Constructors +- [#ctor(System.Type[])](./DefaultEcs-System-WithoutEitherAttribute--ctor(System-Type--).md 'DefaultEcs.System.WithoutEitherAttribute.#ctor(System.Type[])') diff --git a/documentation/api/DefaultEcs.md b/documentation/api/DefaultEcs.md index a5cb1e10..3626f5dc 100644 --- a/documentation/api/DefaultEcs.md +++ b/documentation/api/DefaultEcs.md @@ -39,8 +39,12 @@ - [SequentialSystem<T>](./DefaultEcs-System-SequentialSystem-T-.md 'DefaultEcs.System.SequentialSystem<T>') - [SystemRunner<T>](./DefaultEcs-System-SystemRunner-T-.md 'DefaultEcs.System.SystemRunner<T>') - [WhenAddedAttribute](./DefaultEcs-System-WhenAddedAttribute.md 'DefaultEcs.System.WhenAddedAttribute') +- [WhenAddedEitherAttribute](./DefaultEcs-System-WhenAddedEitherAttribute.md 'DefaultEcs.System.WhenAddedEitherAttribute') - [WhenChangedAttribute](./DefaultEcs-System-WhenChangedAttribute.md 'DefaultEcs.System.WhenChangedAttribute') +- [WhenChangedEitherAttribute](./DefaultEcs-System-WhenChangedEitherAttribute.md 'DefaultEcs.System.WhenChangedEitherAttribute') - [WhenRemovedAttribute](./DefaultEcs-System-WhenRemovedAttribute.md 'DefaultEcs.System.WhenRemovedAttribute') -- [WithAnyAttribute](./DefaultEcs-System-WithAnyAttribute.md 'DefaultEcs.System.WithAnyAttribute') +- [WhenRemovedEitherAttribute](./DefaultEcs-System-WhenRemovedEitherAttribute.md 'DefaultEcs.System.WhenRemovedEitherAttribute') - [WithAttribute](./DefaultEcs-System-WithAttribute.md 'DefaultEcs.System.WithAttribute') +- [WithEitherAttribute](./DefaultEcs-System-WithEitherAttribute.md 'DefaultEcs.System.WithEitherAttribute') - [WithoutAttribute](./DefaultEcs-System-WithoutAttribute.md 'DefaultEcs.System.WithoutAttribute') +- [WithoutEitherAttribute](./DefaultEcs-System-WithoutEitherAttribute.md 'DefaultEcs.System.WithoutEitherAttribute') diff --git a/image/badge_coverage.svg b/image/badge_coverage.svg index ab4cc894..905fbefe 100644 --- a/image/badge_coverage.svg +++ b/image/badge_coverage.svg @@ -77,8 +77,8 @@ Coverage Coverage - 89.6%89.6% - 81.8%81.8% + 90.6%90.6% + 83.6%83.6% diff --git a/source/DefaultEcs/DefaultEcs.Package.csproj b/source/DefaultEcs/DefaultEcs.Package.csproj index ef54f694..ee9fd30f 100644 --- a/source/DefaultEcs/DefaultEcs.Package.csproj +++ b/source/DefaultEcs/DefaultEcs.Package.csproj @@ -19,7 +19,7 @@ git gamedev game-development game-engine ecs entity-component-system - 0.12.0-alpha1 + 0.12.0 breaking change: renamed EntitySetBuilder.WithAny and WithAny attribute to WithEither diff --git a/source/DefaultEcs/System/SystemRunner.cs b/source/DefaultEcs/System/SystemRunner.cs index 13d0e753..e3c24eb6 100644 --- a/source/DefaultEcs/System/SystemRunner.cs +++ b/source/DefaultEcs/System/SystemRunner.cs @@ -8,6 +8,16 @@ namespace DefaultEcs.System { + //public interface ISystemRunner : IDisposable + //{ + // void Update(ASystem system); + //} + + //public interface IRunnableSystem : ISystem + //{ + // void Update(int index, int maxIndex); + //} + /// /// Represents an helper object used to update a system in parallel. /// diff --git a/source/Sample/DefaultBrick/DefaultBrick.csproj b/source/Sample/DefaultBrick/DefaultBrick.csproj index 1cb83ddb..2ae9d588 100644 --- a/source/Sample/DefaultBrick/DefaultBrick.csproj +++ b/source/Sample/DefaultBrick/DefaultBrick.csproj @@ -1,7 +1,7 @@  latest - netcoreapp2.1 + netcoreapp2.2 true Debug;Release diff --git a/source/Sample/DefaultSlap/DefaultSlap.csproj b/source/Sample/DefaultSlap/DefaultSlap.csproj index 1cb83ddb..2ae9d588 100644 --- a/source/Sample/DefaultSlap/DefaultSlap.csproj +++ b/source/Sample/DefaultSlap/DefaultSlap.csproj @@ -1,7 +1,7 @@  latest - netcoreapp2.1 + netcoreapp2.2 true Debug;Release