public bool IsLinked(LinkToInformation link)
 {
     if (_isLinkedFactory == null)
     {
         return(false);
     }
     return(_isLinkedFactory(link));
 }
        private bool IsLinked(LinkToInformation linkInfo)
        {
            PropertyInfo fieldLinkedTargets =
                _debugInfo.GetType().GetProperty("LinkedTargets", ReflectBlockExtensions.DEFAULT_FLAGS);
            object targetRegistry = fieldLinkedTargets.GetValue(_debugInfo);

            if (targetRegistry != null)
            {
                PropertyInfo propTargetsForDebugger =
                    targetRegistry.GetType().GetProperty("TargetsForDebugger", ReflectBlockExtensions.DEFAULT_FLAGS);
                object[] targets = propTargetsForDebugger.GetValue(targetRegistry) as IDataflowBlock[];
                return(targets.Any(m =>
                                   (m as ILinkHook).LinkInfo == linkInfo));
            }
            return(false);
        }
Пример #3
0
 public void RemoveLink(LinkToInformation link)
 {
     Items.Remove(link.Connector);
     Items.Remove(link);
 }
Пример #4
0
 public void AddLink(LinkToInformation link)
 {
     Items.Add(link);
     Items.Insert(0, link.Connector);
 }