예제 #1
0
파일: InputPin.cs 프로젝트: tica/DataFlow
        internal void Connect(OutputPin pin)
        {
            if (IsConnected)
                throw new InvalidOperationException("InputPin is already connected");

            ConnectedPin = pin;
        }
예제 #2
0
        private XElement SaveConnections(OutputPin pin)
        {
            if (!pin.ConnectedPins.Any())
                return null;

            return new XElement("From",
                new XAttribute("Pin", pin.PinDesc.Name),
                pin.ConnectedPins.Select( inputPin => SaveConnection(pin, inputPin) )
            );
        }
예제 #3
0
 private XElement SaveConnection(OutputPin outputPin, InputPin inputPin )
 {
     return new XElement("To",
         new XAttribute("FilterGuid", inputPin.FilterInstance.Guid.ToString()),
         new XAttribute("Pin", inputPin.PinDesc.Name)
     );
 }