mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Add Attribute generic constraint to IReflectionManager.FindTypesWithAttribute (#1548)
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Robust.Shared.Reflection
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Attribute to search for.</typeparam>
|
||||
/// <returns>Enumeration of all types with the specified attribute.</returns>
|
||||
IEnumerable<Type> FindTypesWithAttribute<T>();
|
||||
IEnumerable<Type> FindTypesWithAttribute<T>() where T : Attribute;
|
||||
|
||||
/// <summary>
|
||||
/// Loads assemblies into the manager and get all the types.
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Robust.Shared.Reflection
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<Type> FindTypesWithAttribute<T>()
|
||||
public IEnumerable<Type> FindTypesWithAttribute<T>() where T : Attribute
|
||||
{
|
||||
var types = new List<Type>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user