internal void Connect(OutputPin pin) { if (IsConnected) throw new InvalidOperationException("InputPin is already connected"); ConnectedPin = pin; }
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) ) ); }
private XElement SaveConnection(OutputPin outputPin, InputPin inputPin ) { return new XElement("To", new XAttribute("FilterGuid", inputPin.FilterInstance.Guid.ToString()), new XAttribute("Pin", inputPin.PinDesc.Name) ); }