/// <summary>
        /// Generates the final composite component definition.
        /// </summary>
        /// <returns></returns>
        internal TraceLab.Core.Components.CompositeComponentMetadataDefinition GenerateCompositeComponentDefinition()
        {
            var componentId = Guid.NewGuid().ToString();

            //first create CompositeComponentMetadefinition based on ExportSettings
            TraceLab.Core.Components.CompositeComponentMetadataDefinition componentDefinition =
                new TraceLab.Core.Components.CompositeComponentMetadataDefinition(
                    componentId,
                    CompositeComponentGraph,
                    CompositeComponentLocationFilePath,
                    Name,
                    Name,
                    Version,
                    Description,
                    Author,
                    new Components.ComponentTags(componentId),
                    new List <DocumentationLink>());

            foreach (string itemName in InputSettings.Keys)
            {
                ItemSetting item = InputSettings[itemName];
                if (item.Include == true)
                {
                    if (componentDefinition.IOSpecDefinition.Input.ContainsKey(itemName) == false)
                    {
                        componentDefinition.IOSpecDefinition.Input.Add(itemName, new TraceLab.Core.Components.IOItemDefinition(itemName, item.Type, item.Description, TraceLabSDK.IOSpecType.Input));
                    }
                }
            }

            foreach (string itemName in OutputSettings.Keys)
            {
                ItemSetting item = OutputSettings[itemName];
                if (item.Include == true)
                {
                    if (componentDefinition.IOSpecDefinition.Output.ContainsKey(itemName) == false)
                    {
                        componentDefinition.IOSpecDefinition.Output.Add(itemName, new TraceLab.Core.Components.IOItemDefinition(itemName, item.Type, item.Description, TraceLabSDK.IOSpecType.Output));
                    }
                }
            }

            foreach (ConfigItemSetting item in ConfigSettings.Values)
            {
                //note here we add all config values, but only some of them are visible at the top level in the property grid
                if (componentDefinition.ConfigurationWrapperDefinition.Properties.ContainsKey(item.Alias) == false)
                {
                    componentDefinition.ConfigurationWrapperDefinition.AddProperty(item.PropertyObject);
                }
            }
            return(componentDefinition);
        }
 private void CollectIO(IConfigurableAndIOSpecifiable metadata, IDictionary <string, IOItem> ioDictionary, SortedDictionary <string, ItemSetting> compositeComponentSettings)
 {
     foreach (IOItem item in ioDictionary.Values)
     {
         var correspondingNodes = CollectCorrespondingNodesForMapping(item.MappedTo, metadata);
         if (compositeComponentSettings.ContainsKey(item.MappedTo) == false)
         {
             var itemSetting = new ItemSetting(item.MappedTo, item.IOItemDefinition.Type, item.IOItemDefinition.Description);
             //set the reference to the list of corresponding nodes that either input or output the same mapping name
             itemSetting.CorrespondingNodes = correspondingNodes;
             compositeComponentSettings.Add(item.MappedTo, itemSetting);
         }
     }
 }
 /// <summary>
 /// Matches the outputs and inputs pairs of the same setting name.
 /// </summary>
 private void MatchOutputsAndInputsPairs()
 {
     foreach (string itemSettingName in OutputSettings.Keys)
     {
         ItemSetting inputSetting;
         if (InputSettings.TryGetValue(itemSettingName, out inputSetting))
         {
             ItemSetting outputSetting = OutputSettings[itemSettingName];
             //match the two item settings (so that they can highlight each other)
             outputSetting.PairSetting = inputSetting;
             inputSetting.PairSetting  = outputSetting;
         }
     }
 }
 private void CollectIO(IConfigurableAndIOSpecifiable metadata, IDictionary<string, IOItem> ioDictionary, SortedDictionary<string, ItemSetting> compositeComponentSettings)
 {
     foreach (IOItem item in ioDictionary.Values)
     {
         var correspondingNodes = CollectCorrespondingNodesForMapping(item.MappedTo, metadata);
         if (compositeComponentSettings.ContainsKey(item.MappedTo) == false)
         {
             var itemSetting = new ItemSetting(item.MappedTo, item.IOItemDefinition.Type, item.IOItemDefinition.Description);
             //set the reference to the list of corresponding nodes that either input or output the same mapping name
             itemSetting.CorrespondingNodes = correspondingNodes;
             compositeComponentSettings.Add(item.MappedTo, itemSetting);
         }
     }
 }