#6400 Add ClearProvider again to ActivityRegistry
This commit is contained in:
parent
996b831886
commit
90d8949661
|
|
@ -13,70 +13,70 @@ public interface IActivityRegistry : IActivityProvider
|
|||
/// </summary>
|
||||
/// <param name="providerType">The type of the activity provider.</param>
|
||||
/// <param name="descriptor">The activity descriptor to add.</param>
|
||||
void Add(Type providerType, ActivityDescriptor descriptor);
|
||||
|
||||
void Add(Type providerType, ActivityDescriptor descriptor);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an activity descriptor from the registry.
|
||||
/// </summary>
|
||||
/// <param name="providerType">The type of the activity provider.</param>
|
||||
/// <param name="descriptor">The activity descriptor to remove.</param>
|
||||
void Remove(Type providerType, ActivityDescriptor descriptor);
|
||||
|
||||
void Remove(Type providerType, ActivityDescriptor descriptor);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all activity descriptors in the registry.
|
||||
/// </summary>
|
||||
/// <returns>All activity descriptors in the registry.</returns>
|
||||
IEnumerable<ActivityDescriptor> ListAll();
|
||||
|
||||
IEnumerable<ActivityDescriptor> ListAll();
|
||||
|
||||
/// <summary>
|
||||
/// Returns all activity descriptors provided by the specified provider.
|
||||
/// </summary>
|
||||
/// <param name="providerType">The type of the activity provider.</param>
|
||||
/// <returns>All activity descriptors provided by the specified provider.</returns>
|
||||
IEnumerable<ActivityDescriptor> ListByProvider(Type providerType);
|
||||
|
||||
IEnumerable<ActivityDescriptor> ListByProvider(Type providerType);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the activity descriptor for the specified activity type.
|
||||
/// </summary>
|
||||
/// <param name="type">The activity type.</param>
|
||||
/// <returns>The activity descriptor for the specified activity type.</returns>
|
||||
ActivityDescriptor? Find(string type);
|
||||
|
||||
ActivityDescriptor? Find(string type);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the activity descriptor for the specified activity type and version.
|
||||
/// </summary>
|
||||
/// <param name="type">The activity type.</param>
|
||||
/// <param name="version">The activity version.</param>
|
||||
/// <returns>The activity descriptor for the specified activity type and version.</returns>
|
||||
ActivityDescriptor? Find(string type, int version);
|
||||
|
||||
ActivityDescriptor? Find(string type, int version);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the activity descriptor matching the specified predicate.
|
||||
/// </summary>
|
||||
/// <param name="predicate">The predicate to match.</param>
|
||||
/// <returns>The activity descriptor matching the specified predicate.</returns>
|
||||
ActivityDescriptor? Find(Func<ActivityDescriptor, bool> predicate);
|
||||
|
||||
ActivityDescriptor? Find(Func<ActivityDescriptor, bool> predicate);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all activity descriptors matching the specified predicate.
|
||||
/// </summary>
|
||||
/// <param name="predicate">The predicate to match.</param>
|
||||
/// <returns>All activity descriptors matching the specified predicate.</returns>
|
||||
IEnumerable<ActivityDescriptor> FindMany(Func<ActivityDescriptor, bool> predicate);
|
||||
|
||||
IEnumerable<ActivityDescriptor> FindMany(Func<ActivityDescriptor, bool> predicate);
|
||||
|
||||
/// <summary>
|
||||
/// Registers an activity descriptor.
|
||||
/// </summary>
|
||||
/// <param name="descriptor">The activity descriptor to register.</param>
|
||||
void Register(ActivityDescriptor descriptor);
|
||||
|
||||
void Register(ActivityDescriptor descriptor);
|
||||
|
||||
/// <summary>
|
||||
/// Registers an activity type.
|
||||
/// </summary>
|
||||
/// <param name="activityType">The activity type to register.</param>
|
||||
/// <param name="cancellationToken">An optional cancellation token.</param>
|
||||
Task RegisterAsync([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type activityType, CancellationToken cancellationToken = default);
|
||||
|
||||
Task RegisterAsync([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type activityType, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Registers multiple activity types.
|
||||
/// </summary>
|
||||
|
|
@ -95,5 +95,16 @@ public interface IActivityRegistry : IActivityProvider
|
|||
/// <summary>
|
||||
/// Refreshes the activity descriptors in the registry by querying the specified activity provider.
|
||||
/// </summary>
|
||||
Task RefreshDescriptorsAsync(IActivityProvider activityProvider, CancellationToken cancellationToken = default);
|
||||
Task RefreshDescriptorsAsync(IActivityProvider activityProvider, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Clears all activity descriptors from the registry.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Clears all activity descriptors provided by the specified provider.
|
||||
/// </summary>
|
||||
/// <param name="providerType">The type of the activity provider.</param>
|
||||
void ClearProvider(Type providerType);
|
||||
}
|
||||
Loading…
Reference in a new issue