Skip to content

[Api] Dynamic Port API

CoffeeVampir3 edited this page Mar 29, 2021 · 6 revisions
public abstract class DynamicValuePort : BasePort

Dynamic Ports inherit base port Base Port API The behaviour of the First functions is undefined for dynamic ports

This is the api page, for usage see: Dynamic Port Usage

Dynamic Value Port

public bool TryGetValue(Link link, out T value)

Tries to get the value of the given link as the type of this DynamicValuePort.

public bool TryGetValueAs<SomeType>(Link link, out SomeType value)

Tries to get the value of the given link as <SomeType>

An important note that each link holds the information for which dynamic port it belongs to:

public class Link {
    public int PortIndex => localPortIndex;
}

See the Dynamic Port Usage for more information.