示例#1
0
        /// <summary>
        /// Creates a new plugin vertex.
        /// </summary>
        /// <param name="parentGraph"></param>
        /// <param name="plugin"></param>
        internal YodiiGraphVertex( YodiiGraph parentGraph, LabPluginInfo plugin )
            : this()
        {
            Debug.Assert( parentGraph != null );
            Debug.Assert( plugin != null );

            _isPlugin = true;
            _livePlugin = plugin;
            _parentGraph = parentGraph;

            _livePlugin.PluginInfo.PropertyChanged += StaticInfo_PropertyChanged;
            _livePlugin.PropertyChanged += _labPlugin_PropertyChanged;
        }
示例#2
0
        /// <summary>
        /// Creates a lab wrapper item around an existing mock plugin, and adds it to our collection.
        /// </summary>
        /// <param name="p">Existing mock plugin</param>
        private void CreateLabPlugin( PluginInfo p )
        {
            LabPluginInfo lp;

            if( p.Service != null )
            {
                p.Service.InternalImplementations.Add( p );
                LabServiceInfo liveService = _labServiceInfos.GetByKey( p.Service );
                lp = new LabPluginInfo( p );
            }
            else
            {
                lp = new LabPluginInfo( p );
            }

            _labPluginInfos.Add( lp );
        }