-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
/// <summary>
/// An advanced version of the Region interface that let's you specify a different factory method other than Func<TInlay>.
/// Useful if you want to feed a Key or Index on Create. The delegate should have one output of type <typeparamref name="TInlay"/>.
/// </summary>
public interface IRegion<TInlayFactory, TInlay>
{
/// <summary>
/// Sets the factory method used to create instances of user patched <typeparamref name="TInlay"/>.
/// </summary>
/// <param name="patchInlayFactory">A function that returns a new instance of <typeparamref name="TInlay"/>.</param>
void SetPatchInlayFactory(TInlayFactory patchInlayFactory);
///....
}
Additionally we can keep the current IRegion<TInlay> interface. It basically only substitutes TInlayFactory with Func<TInlay> and thus only has one type parameter left
/// <summary>
/// Implemented by the region designer. <typeparamref name="TInlay"/> defines how the patch inlay looks like and will be implemented by the user.
/// </summary>
/// <remarks>
/// We currently assume that the class implementing this interface has an operation called "Update".
/// In its current state input control points are assumed to operate on the "Update" operation
/// while output control points other than splicers and accumulators can be used from multiple moments.
/// This restriction might be lifted in the future.
/// </remarks>
public interface IRegion<TInlay> : IRegion<Func<TInlay>, TInlay>
{
}