Inheritance: VMICoreElement
Exemplo n.º 1
0
        public VMIService( VMIContextViewModel ctx, IServiceReferenceInfo service, VMIBase parent )
            : base(ctx, parent)
        {
            _serviceRef = service;
            _service = service.Reference;
            Label = service.Reference.ServiceFullName;
            OnError = service.HasError;

            if( service.Reference.IsDynamicService )
                Assembly = service.Reference.AssemblyInfo.AssemblyName;

            _pluginRunner = VMIContext.Context.GetService<PluginRunner>( true );
            _pluginRunner.ApplyDone += new EventHandler<ApplyDoneEventArgs>( OnApplyDone );

            DetailsTemplateName = "ServiceRefDetails";
            _owner = new VMIPlugin( ctx, service.Owner, this );
            _reference = new VMIService( ctx, service.Reference, this );

            _allReferencingPlugins = new Dictionary<VMIPlugin,RunningRequirement>();
            ImplementedBy = new VMCollection<VMAlias<VMIPlugin>, IPluginInfo>( _service.Implementations, ( info ) => { return new VMAlias<VMIPlugin>( VMIContext.FindOrCreate( info ), this ); } );
        }
Exemplo n.º 2
0
 public VMIPlugin FindOrCreate( IPluginInfo item )
 {
     VMIPlugin p = null;
     if( !_plugins.TryGetValue( item, out p ) )
     {
         p = new VMIPlugin( this, item, null );
         _plugins.Add( item, p );
     }
     return p;
 }
Exemplo n.º 3
0
 public VMIPluginRequirementLayer( VMIPlugin plugin, RequirementLayer layer )
 {
     _layer = layer;
     _plugin = plugin;
 }