Skip to content

[Proposal] New IRegion interface: Allow input and output pins on Create #74

Description

@gregsn
    /// <summary>
    /// An advanced version of the Region interface that let's you specify a different factory method other than Func&lt;TInlay&gt;.
    /// 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>
    {
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions