public void Serialize(ElementPropertyBag epb) { ConnectionPropertyBag cpb = new ConnectionPropertyBag(); cpb.ToElementId = ToElement.Id; cpb.ToConnectionPoint = ToConnectionPoint; cpb.ElementConnectionPoint = ElementConnectionPoint; epb.Connections.Add(cpb); }
public void Serialize(ElementPropertyBag epb, IEnumerable <GraphicElement> elementsBeingSerialized) { // If partial serialization (like copying a subset of shapes, don't include unselected connectors.) if (elementsBeingSerialized.Contains(ToElement)) { ConnectionPropertyBag cpb = new ConnectionPropertyBag(); cpb.ToElementId = ToElement.Id; cpb.ToConnectionPoint = ToConnectionPoint; cpb.ElementConnectionPoint = ElementConnectionPoint; epb.Connections.Add(cpb); } }
public void Deserialize(List <GraphicElement> elements, ConnectionPropertyBag cpb, Dictionary <Guid, Guid> oldNewGuidMap) { ToElement = elements.Single(e => e.Id == oldNewGuidMap[cpb.ToElementId]); ToConnectionPoint = cpb.ToConnectionPoint; ElementConnectionPoint = cpb.ElementConnectionPoint; }
public void Deserialize(List <GraphicElement> elements, ConnectionPropertyBag cpb) { ToElement = elements.Single(e => e.Id == cpb.ToElementId); ToConnectionPoint = cpb.ToConnectionPoint; ElementConnectionPoint = cpb.ElementConnectionPoint; }