You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2021. It is now read-only.
/// Class that defines a single entry point for a VisualProgram.
/// </summary>
public sealed class EntryDefinition {
/// <summary>
/// The ID of the definition. This must be unique and will determine the name of the action in the compiled program.
/// </summary>
public string Id { get; }
/// <summary>
/// The user-friendly display name of the definition.
/// </summary>
public string Name { get; }
/// <summary>
/// Specifies the parameters that will be passed to this entry. This will define the signature of the compiled delegate generated by this VisualEntry.<para/>
/// Note that it IS safe to re-order parameters between versions without breaking existing programs (since the lambda is recompiled at runtime), however it IS
/// NOT safe to rename or change the type of existing parameters (because this may break existing parameter maps in the VisualEntry instances). It is also safe
/// to add new parameters without affecting existing programs.
/// </summary>
public IndexedDictionary<string, Type> Parameters { get; set; }
public EntryDefinition(string id, string name, IEnumerable<KeyValuePair<string, Type>> parameters) {
if (string.IsNullOrWhiteSpace(id)) throw new ArgumentNullException(nameof(id), "ID must be non-null and non-empty.");
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(nameof(name), "Name must be non-null and non-empty.");
Id = id;
Name = name;
Parameters = new IndexedDictionary<string, Type>(parameters);