diff --git a/src/modules/Elsa.Workflows.Core/Contracts/IActivityRegistry.cs b/src/modules/Elsa.Workflows.Core/Contracts/IActivityRegistry.cs
index 9b2537ac2..03ef41876 100644
--- a/src/modules/Elsa.Workflows.Core/Contracts/IActivityRegistry.cs
+++ b/src/modules/Elsa.Workflows.Core/Contracts/IActivityRegistry.cs
@@ -13,70 +13,70 @@ public interface IActivityRegistry : IActivityProvider
///
/// The type of the activity provider.
/// The activity descriptor to add.
- void Add(Type providerType, ActivityDescriptor descriptor);
-
+ void Add(Type providerType, ActivityDescriptor descriptor);
+
///
/// Removes an activity descriptor from the registry.
///
/// The type of the activity provider.
/// The activity descriptor to remove.
- void Remove(Type providerType, ActivityDescriptor descriptor);
-
+ void Remove(Type providerType, ActivityDescriptor descriptor);
+
///
/// Returns all activity descriptors in the registry.
///
/// All activity descriptors in the registry.
- IEnumerable ListAll();
-
+ IEnumerable ListAll();
+
///
/// Returns all activity descriptors provided by the specified provider.
///
/// The type of the activity provider.
/// All activity descriptors provided by the specified provider.
- IEnumerable ListByProvider(Type providerType);
-
+ IEnumerable ListByProvider(Type providerType);
+
///
/// Returns the activity descriptor for the specified activity type.
///
/// The activity type.
/// The activity descriptor for the specified activity type.
- ActivityDescriptor? Find(string type);
-
+ ActivityDescriptor? Find(string type);
+
///
/// Returns the activity descriptor for the specified activity type and version.
///
/// The activity type.
/// The activity version.
/// The activity descriptor for the specified activity type and version.
- ActivityDescriptor? Find(string type, int version);
-
+ ActivityDescriptor? Find(string type, int version);
+
///
/// Returns the activity descriptor matching the specified predicate.
///
/// The predicate to match.
/// The activity descriptor matching the specified predicate.
- ActivityDescriptor? Find(Func predicate);
-
+ ActivityDescriptor? Find(Func predicate);
+
///
/// Returns all activity descriptors matching the specified predicate.
///
/// The predicate to match.
/// All activity descriptors matching the specified predicate.
- IEnumerable FindMany(Func predicate);
-
+ IEnumerable FindMany(Func predicate);
+
///
/// Registers an activity descriptor.
///
/// The activity descriptor to register.
- void Register(ActivityDescriptor descriptor);
-
+ void Register(ActivityDescriptor descriptor);
+
///
/// Registers an activity type.
///
/// The activity type to register.
/// An optional cancellation token.
- Task RegisterAsync([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type activityType, CancellationToken cancellationToken = default);
-
+ Task RegisterAsync([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type activityType, CancellationToken cancellationToken = default);
+
///
/// Registers multiple activity types.
///
@@ -95,5 +95,16 @@ public interface IActivityRegistry : IActivityProvider
///
/// Refreshes the activity descriptors in the registry by querying the specified activity provider.
///
- Task RefreshDescriptorsAsync(IActivityProvider activityProvider, CancellationToken cancellationToken = default);
+ Task RefreshDescriptorsAsync(IActivityProvider activityProvider, CancellationToken cancellationToken = default);
+
+ ///
+ /// Clears all activity descriptors from the registry.
+ ///
+ void Clear();
+
+ ///
+ /// Clears all activity descriptors provided by the specified provider.
+ ///
+ /// The type of the activity provider.
+ void ClearProvider(Type providerType);
}
\ No newline at end of file