public IDiagramNodeItem GetDataObject(GenericNode node) { if (IsAlias) return node; if (PropertyInfo != null) { var result = PropertyInfo.GetValue(node, null) as GenericSlot; if (result == null) { var slot = Activator.CreateInstance((Type)PropertyInfo.PropertyType) as GenericSlot; slot.Node = node; slot.Name = AttributeInfo.Name; PropertyInfo.SetValue(node, slot, null); return slot; } return result; } return node.GetConnectionReference(ReferenceType); }
public IDiagramNodeItem GetDataObject(GenericNode node) { if (IsAlias) { return(node); } if (PropertyInfo != null) { var result = PropertyInfo.GetValue(node, null) as GenericSlot; if (result == null) { var slot = Activator.CreateInstance((Type)PropertyInfo.PropertyType) as GenericSlot; slot.Node = node; slot.Name = AttributeInfo.Name; PropertyInfo.SetValue(node, slot, null); return(slot); } return(result); } return(node.GetConnectionReference(ReferenceType)); }