- Initial commit
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Best.HTTP.Shared.Databases.MetadataIndexFinders
|
||||
{
|
||||
public sealed class FindDeletedMetadataIndexFinder<MetadataType> : IEmptyMetadataIndexFinder<MetadataType> where MetadataType : Metadata
|
||||
{
|
||||
public int FindFreeIndex(List<MetadataType> metadatas)
|
||||
{
|
||||
for (int i = 0; i < metadatas.Count; ++i)
|
||||
if (metadatas[i].IsDeleted)
|
||||
return i;
|
||||
|
||||
return metadatas.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user