Fixing PR #15318 which updated an interface, which is breaking (#15363)

This commit is contained in:
Sebastiaan Janssen
2023-12-05 16:49:55 +01:00
committed by GitHub
parent e7279d2ff0
commit a6b53b0a93

View File

@@ -27,7 +27,18 @@ public interface IFileTypeCollection
/// <returns>
/// <c>true</c> if the file type associated with the specified entity type was found; otherwise, <c>false</c>.
/// </returns>
bool TryGetValue(string entityType, [NotNullWhen(true)] out IFileType? fileType);
bool TryGetValue(string entityType, [NotNullWhen(true)] out IFileType? fileType)
{
// TODO (V14): Remove default implementation
if (Contains(entityType))
{
fileType = this[entityType];
return true;
}
fileType = null;
return false;
}
/// <summary>
/// Determines whether this collection contains a file type for the specified entity type.
@@ -44,5 +55,5 @@ public interface IFileTypeCollection
/// <returns>
/// The entity types.
/// </returns>
ICollection<string> GetEntityTypes();
ICollection<string> GetEntityTypes() => Array.Empty<string>(); // TODO (V14): Remove default implementation
}