Skip to content

Commit

Permalink
Renamed excludedTypes internal
Browse files Browse the repository at this point in the history
  • Loading branch information
Øyvind Tanum committed Nov 21, 2023
1 parent 1cdb7f8 commit bb84fb7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Epinova.ElasticSearch.Core/Conventions/Indexing.Types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ namespace Epinova.ElasticSearch.Core.Conventions
{
public sealed partial class Indexing
{
private static readonly List<Type> Types = new List<Type>();
private static readonly List<Type> _listExcludedTypes = new List<Type>();

internal static Type[] ExcludedTypes => Types.ToArray();
internal static Type[] ExcludedTypes => _listExcludedTypes.ToArray();

internal Indexing ExcludeType(Type type)
{
if(!Types.Contains(type))
if(!_listExcludedTypes.Contains(type))
{
Logger.Information($"Excluding type: {type.FullName}");
Types.Add(type);
_listExcludedTypes.Add(type);
}

return this;
Expand All @@ -27,7 +27,6 @@ internal Indexing ExcludeType(Type type)
/// </summary>
/// <typeparam name="T">The type</typeparam>
/// <returns>The <see cref="Indexing"/> instance</returns>
public Indexing ExcludeType<T>()
=> ExcludeType(typeof(T));
public Indexing ExcludeType<T>() => ExcludeType(typeof(T));
}
}

0 comments on commit bb84fb7

Please sign in to comment.