public Connection(ConnectionType type, NodeDataBase data, IConnectionChildCollection childCollection, IDialogueWindow window, bool isFirst)
 {
     IsFirst          = isFirst;
     Window           = window;
     Type             = type;
     Data             = data;
     _childCollection = childCollection;
     Links            = new ConnectionLinks(this, childCollection);
 }
Beispiel #2
0
        public void CreateConnection(ConnectionType type, IConnectionChildCollection childCollection, bool isFirst)
        {
            var connection = new Connection(type, Data, childCollection, Window, isFirst);

            _connections.Add(connection);
            switch (type)
            {
            case ConnectionType.In:
                _in.Add(connection);
                break;

            case ConnectionType.Out:
                _out.Add(connection);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
 public ConnectionLinks(Connection owner, IConnectionChildCollection childCollection)
 {
     _owner           = owner;
     _childCollection = childCollection;
 }