This repository has been archived on 2023-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
Sic02/FrameworkLocal/UIClient/Caliburn.Micro/Core/ICloseStrategy.cs

19 lines
851 B
C#
Raw Permalink Normal View History

2022-08-05 14:47:02 +08:00
namespace Caliburn.Micro.Core {
using System;
using System.Collections.Generic;
/// <summary>
/// Used to gather the results from multiple child elements which may or may not prevent closing.
/// </summary>
/// <typeparam name="T">The type of child element.</typeparam>
public interface ICloseStrategy<T> {
/// <summary>
/// Executes the strategy.
/// </summary>
/// <param name="toClose">Items that are requesting close.</param>
/// <param name="callback">The action to call when all enumeration is complete and the close results are aggregated.
/// The bool indicates whether close can occur. The enumerable indicates which children should close if the parent cannot.</param>
void Execute(IEnumerable<T> toClose, Action<bool, IEnumerable<T>> callback);
}
}