cleanup Obsolete

This commit is contained in:
Mikhail 2026-03-16 10:35:43 +08:00
parent bc5278c021
commit 821fd37d85
5 changed files with 0 additions and 224 deletions

View File

@ -418,52 +418,6 @@ namespace DCFApixels.DragonECS
EcsMask IComponentMask.ToMask(EcsWorld world) { return _mask; }
#endregion
#region Obsolete
[Obsolete("Use EcsMask.GetIterator()")]
public Iterator GetIterator()
{
return new Iterator(Mask.GetIterator(), _source.Entities);
}
[Obsolete("Use EcsMask.GetIterator().Iterate(span)")]
public Iterator GetIteratorFor(EcsSpan span)
{
return new Iterator(Mask.GetIterator(), span);
}
[Obsolete("Use EcsMaskIterator")]
public ref struct Iterator
{
public readonly short worldID;
public readonly EcsMaskIterator.Enumerable iterator;
public Iterator(EcsMaskIterator iterator, EcsSpan span)
{
worldID = iterator.World.ID;
this.iterator = iterator.Iterate(span);
}
#region CopyTo
public void CopyTo(EcsGroup group)
{
iterator.CopyTo(group);
}
public int CopyTo(ref int[] array)
{
return iterator.CopyTo(ref array);
}
public EcsSpan CopyToSpan(ref int[] array)
{
int count = CopyTo(ref array);
return new EcsSpan(worldID, array, count);
}
#endregion
public EcsMaskIterator.Enumerable.Enumerator GetEnumerator()
{
return iterator.GetEnumerator();
}
}
#endregion
#region Events
public delegate void OnInitApectHandler(object aspect, Builder builder);
public static event OnInitApectHandler OnInit = delegate { };

View File

@ -475,34 +475,6 @@ namespace DCFApixels.DragonECS
}
}
#endregion
#region Obsolete
/// <summary> Sorted set including constraints. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use Incs")]
public ReadOnlySpan<int> Inc
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get { return _incs; }
}
/// <summary> Sorted set excluding constraints. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use Excs")]
public ReadOnlySpan<int> Exc
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get { return _excs; }
}
public partial struct Builder
{
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Include<T>() { return Inc<T>(); }
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Exclude<T>() { return Exc<T>(); }
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Include(Type type) { return Inc(type); }
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Exclude(Type type) { return Exc(type); }
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Inc(int componentTypeID) { Inc(_world.GetComponentType(componentTypeID)); return this; }
[EditorBrowsable(EditorBrowsableState.Never)][Obsolete] public Builder Exc(int componentTypeID) { Exc(_world.GetComponentType(componentTypeID)); return this; }
}
#endregion
}
[Flags]

View File

@ -600,20 +600,6 @@ namespace DCFApixels.DragonECS
}
}
#endregion
#region Obsolete
[Obsolete("Use " + nameof(Injections))]
public readonly InitInjectionList Injector;
[Obsolete("Use LayersMap")]
public class LayerList : LayersMap
{
//public LayerList(Builder source, string basicLayerName) : base(source, basicLayerName) { }
//public LayerList(Builder source, string preBeginlayer, string beginlayer, string basicLayer, string endLayer, string postEndLayer) : base(source, preBeginlayer, beginlayer, basicLayer, endLayer, postEndLayer) { }
public LayerList(IDependencyGraph<string> graph, Builder pipelineBuilder) : base(graph, pipelineBuilder)
{
}
}
#endregion
}
}

View File

@ -252,74 +252,5 @@ namespace DCFApixels.DragonECS.Core
return _graph.Sort();
}
#endregion
#region Obsolete
[Obsolete("Use " + nameof(LayersMap) + ".Add(layer).Before(targetLayer).Back;")]
public EcsPipeline.Builder Insert(string targetLayer, string newLayer)
{
Add(newLayer).Before(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Add(layer).After(targetLayer).Back;")]
public EcsPipeline.Builder InsertAfter(string targetLayer, string newLayer)
{
Add(newLayer).After(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Move(layer).Before(targetLayer).Back;")]
public EcsPipeline.Builder Move(string targetLayer, string newLayer)
{
Move(newLayer).Before(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Move(layer).After(targetLayer).Back;")]
public EcsPipeline.Builder MoveAfter(string targetLayer, string newLayer)
{
Move(newLayer).After(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Add(layers).Before(targetLayer).Back;")]
public EcsPipeline.Builder Insert(string targetLayer, params string[] newLayers)
{
Add(newLayers).Before(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Add(layers).After(targetLayer).Back;")]
public EcsPipeline.Builder InsertAfter(string targetLayer, params string[] newLayers)
{
Add(newLayers).After(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Move(layers).Before(targetLayer).Back;")]
public EcsPipeline.Builder Move(string targetLayer, params string[] movingLayers)
{
Move(movingLayers).Before(targetLayer);
return _pipelineBuilder;
}
[Obsolete("Use " + nameof(LayersMap) + ".Move(layers).After(targetLayer).Back;")]
public EcsPipeline.Builder MoveAfter(string targetLayer, params string[] movingLayers)
{
Move(movingLayers).After(targetLayer);
return _pipelineBuilder;
}
[Obsolete]
public object this[int index]
{
get
{
int i = 0;
foreach (var item in this)
{
if (i == index)
{
return item;
}
i++;
}
return null;
}
}
#endregion
}
}

View File

@ -5,73 +5,6 @@ using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace DCFApixels.DragonECS.UncheckedCore
{
[Obsolete("Use DCFApixels.DragonECS.Core.UncheckedUtility")]
public static class UncheckedCoreUtility
{
#region CreateEntLong
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static entlong CreateEntLong(int entityID, short gen, short worldID)
{
return new entlong(entityID, gen, worldID);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static entlong CreateEntLong(long entityGenWorld)
{
return new entlong(entityGenWorld);
}
#endregion
#region CreateSpan
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EcsSpan CreateSpan(short worldID, ReadOnlySpan<int> entitesArray)
{
return new EcsSpan(worldID, entitesArray);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EcsSpan CreateSpan(short worldID, int[] entitesArray, int startIndex, int length)
{
return new EcsSpan(worldID, entitesArray, startIndex, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EcsSpan CreateSpan(short worldID, int[] entitesArray, int length)
{
return new EcsSpan(worldID, entitesArray, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EcsSpan CreateSpan(short worldID, int[] entitesArray)
{
return new EcsSpan(worldID, entitesArray);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EcsSpan CreateEmptySpan(short worldID)
{
return new EcsSpan(worldID, Array.Empty<int>());
}
public static bool CheckSpanValideDebug(EcsSpan span)
{
HashSet<int> set = new HashSet<int>();
foreach (var e in span)
{
if (set.Add(e) == false)
{
return false;
}
}
return true;
}
#endregion
#region EcsGroup
public static EcsGroup GetSourceInstance(EcsReadonlyGroup group)
{
return group.GetSource_Internal();
}
#endregion
}
}
namespace DCFApixels.DragonECS.Core.Unchecked
{
public static class UncheckedUtility