rename to EnsureGet
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Pilz.Plugins.Advanced.Exceptions;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Pilz.Plugins.Advanced;
|
||||
@@ -207,7 +208,7 @@ public class PluginFeatureController
|
||||
return GetAll<T>().FirstOrDefault();
|
||||
}
|
||||
|
||||
public virtual T? Get<T>(bool throwIfNull) where T : PluginFeature
|
||||
public virtual T EnsureGet<T>() where T : PluginFeature
|
||||
{
|
||||
if (Get<T>() is T feature)
|
||||
return feature;
|
||||
|
||||
Reference in New Issue
Block a user