Skip to content

Commit

Permalink
exclude obsolete methods from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Dec 2, 2024
1 parent dbf9309 commit 3f1547c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ECS/Index/IndexExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Friflo.Engine.ECS.Index;

// ReSharper disable once CheckNamespace
Expand Down Expand Up @@ -58,6 +59,7 @@ public static LinkComponentIndex<TLinkComponent> LinkComponentIndex<TLinkCompone
/// Executes in O(1) with default index.
/// </summary>
[Obsolete("replace with indexer: ComponentIndex<TIndexedComponent,TValue>()[TValue]")]
[ExcludeFromCodeCoverage]
public static Entities GetEntitiesWithComponentValue<TComponent, TValue>(this EntityStore store, TValue value)
where TComponent: struct, IIndexedComponent<TValue>
{
Expand Down Expand Up @@ -85,6 +87,7 @@ public static Entities GetEntitiesWithComponentValue<TComponent, TValue>(this En
/// </list>
/// </remarks>
[Obsolete("replace with property: ComponentIndex<TIndexedComponent,TValue>().Values")]
[ExcludeFromCodeCoverage]
public static IReadOnlyCollection<TValue> GetAllIndexedComponentValues<TComponent, TValue>(this EntityStore store)
where TComponent: struct, IIndexedComponent<TValue>
{
Expand Down Expand Up @@ -112,6 +115,7 @@ public static IReadOnlyCollection<TValue> GetAllIndexedComponentValues<TCompone
/// </list>
/// </remarks>
[Obsolete("replace with property: LinkComponentIndex<TLinkComponent>().Values")]
[ExcludeFromCodeCoverage]
public static IReadOnlyCollection<Entity> GetAllLinkedEntities<TComponent>(this EntityStore store)
where TComponent: struct, ILinkComponent
{
Expand Down
4 changes: 4 additions & 0 deletions src/ECS/Relations/RelationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Friflo.Engine.ECS.Relations;

// ReSharper disable once CheckNamespace
Expand Down Expand Up @@ -129,6 +130,7 @@ public static EntityRelations<TRelation> EntityRelations<TRelation>(this EntityS
/// </list>
/// </remarks>
[Obsolete("replace with property: EntityRelations<TRelation>().Entities")]
[ExcludeFromCodeCoverage]
public static EntityReadOnlyCollection GetAllEntitiesWithRelations<TRelation>(this EntityStore store)
where TRelation : struct, IRelation
{
Expand All @@ -142,6 +144,7 @@ public static EntityReadOnlyCollection GetAllEntitiesWithRelations<TRelation>(th
/// Executes in O(N) N: number of all entity relations.
/// </summary>
[Obsolete("replace with method: EntityRelations<TRelation>().For()")]
[ExcludeFromCodeCoverage]
public static void ForAllEntityRelations<TRelation>(this EntityStore store, ForEachEntity<TRelation> lambda)
where TRelation : struct, IRelation
{
Expand All @@ -155,6 +158,7 @@ public static void ForAllEntityRelations<TRelation>(this EntityStore store, ForE
/// Executes in O(1). Most efficient way to iterate all entity relations.
/// </summary>
[Obsolete("replace with property: EntityRelations<TRelation>().Pairs")]
[ExcludeFromCodeCoverage]
public static (Entities entities, Chunk<TRelation> relations) GetAllEntityRelations<TRelation>(this EntityStore store)
where TRelation : struct, IRelation
{
Expand Down

0 comments on commit 3f1547c

Please sign in to comment.