diff --git a/src/DataModel/GameConfigurationHelper.cs b/src/DataModel/GameConfigurationHelper.cs index 2bca0ad3b..3cae81d5c 100644 --- a/src/DataModel/GameConfigurationHelper.cs +++ b/src/DataModel/GameConfigurationHelper.cs @@ -116,6 +116,22 @@ public static IEnumerable GetObjectsOf(this GameConfiguration gameConfigur return Enumerable.Empty(); } + /// + /// Gets the objects of the specified type. + /// + /// The game configuration. + /// The type of the wanted objects. + /// The objects of the specified type. + public static IEnumerable GetObjectsOf(this GameConfiguration gameConfiguration, Type type) + { + if (Enumerables.TryGetValue(type, out var enumerableGetter)) + { + return enumerableGetter(gameConfiguration).OfType(); + } + + return Enumerable.Empty(); + } + /// /// Gets the instance of which is referenced within /// the based on their equality. @@ -140,22 +156,6 @@ public static IEnumerable GetObjectsOf(this GameConfiguration gameConfigur return result; } - /// - /// Gets the objects of the specified type. - /// - /// The game configuration. - /// The type of the wanted objects. - /// The objects of the specified type. - public static IEnumerable GetObjectsOf(this GameConfiguration gameConfiguration, Type type) - { - if (Enumerables.TryGetValue(type, out var enumerableGetter)) - { - return enumerableGetter(gameConfiguration).OfType(); - } - - return Enumerable.Empty(); - } - /// /// Gets the instance of which is referenced within /// the based on their equality.