private void ControlsToData()
{
if (port == null)
port = new PhysicalInterfacePortsPort();
Port tempPort = portControl.Port;
if (tempPort != null)
{
port.direction = tempPort.direction;
port.directionSpecified = tempPort.directionSpecified;
port.Extension = tempPort.Extension;
port.name = tempPort.name;
port.type = tempPort.type;
port.typeSpecified = tempPort.typeSpecified;
connectorLocationPinListControl.Connectors = connectors;
if (connectorLocationPinListControl.ConnectorLocations != null
&& connectorLocationPinListControl.ConnectorLocations.Count > 0)
port.ConnectorPins = connectorLocationPinListControl.ConnectorLocations;
else
port.ConnectorPins = null;
//TODO: Address if we start handling Extentions
port.Extension = null;
}
}