SilverlightMappingToolBasic.UI.SuperGraph.View.SuperGraphControl.TransclusionsLoadCompleted C# (CSharp) Method

TransclusionsLoadCompleted() private method

private TransclusionsLoadCompleted ( object sender, TransclusionLoadEventArgs eventArgs ) : void
sender object
eventArgs TransclusionLoadEventArgs
return void
        private void TransclusionsLoadCompleted(object sender, TransclusionLoadEventArgs eventArgs)
        {
            var controller = IoC.GetInstance<ISuperGraphNodeOperations>();
            controller.TransclusionsLoadCompleted -= TransclusionsLoadCompleted;
            var node = eventArgs.Node;

            //If there is only one Map Container Node then the node isn't transcluded
            if (eventArgs.MapContainerNodes != null && eventArgs.MapContainerNodes.Count > 1)
            {
                //Filter out the current map context to have the transclusions only
                var filteredContainers = new Dictionary<Guid, string>();
                foreach (KeyValuePair<Guid, string> mapContainerNode in eventArgs.MapContainerNodes)
                {
                    if (Context != null && Context.Proxy != null)
                    {
                        if (Context.Proxy.Id != mapContainerNode.Key)
                        {
                            filteredContainers.Add(mapContainerNode.Key, mapContainerNode.Value);
                        }
                    }
                    else
                    {
                        DebugLogger.Instance.LogMsg(
                            "Context or Context.Proxy was null when a transcluded node was selected.");
                    }
                }
                if (filteredContainers.Count > 0)
                {
                    var json = SerializeToJsonDictionary(filteredContainers, node.DomainId, node.Proxy.Id);
                    RelatedContentPanelUtil.Instance.ShowRelatedMaps(json);
                }
                else
                {
                    //if there are no maps that it is within clear the related maps panel from view
                    RelatedContentPanelUtil.Instance.ClearRelatedMaps();
                }
            }
            else
            {
                //if it's not transcluded clear the related maps side panel
                RelatedContentPanelUtil.Instance.ClearRelatedMaps();
            }
        }
SuperGraphControl