Add HasFeature method to IModule interface

The IModule interface has been updated to include two methods, HasFeature<T>() and HasFeature(Type featureType). These methods are designed to check if a specific type of feature has been configured, enhancing the functionality provided by the interface.
This commit is contained in:
Sipke Schoorstra 2024-04-01 14:16:30 +02:00
parent 96ba4f4e1c
commit ce77155baa

View file

@ -17,6 +17,16 @@ public interface IModule
/// A dictionary into which features can stash away values for later use.
/// </summary>
IDictionary<object, object> Properties { get; }
/// <summary>
/// Returns true if a feature of the specified type has been configured.
/// </summary>
bool HasFeature<T>() where T : class, IFeature;
/// <summary>
/// Returns true if a feature of the specified type has been configured.
/// </summary>
bool HasFeature(Type featureType);
/// <summary>
/// Creates and configures a feature of the specified type.