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 ); } );
}