anchor.diff:      ManagedPlugin:ManagedPlugin
   }
   
  -//todo: refactor so we don't expose mutable properties and methods that could result in invalid state.
   ///Represents a plugin being managed by the PluginManager
   and ManagedPlugin = {
       ///The plugin being managed
  
positive.code: open System
  open Microsoft.FSharp.Collections
  
  //todo: rename IEye?
  ///Specifies a watch viewer interface, an instance which can add or update one or more watches with 
  ///a custom watch viewer control
  type IWatchViewer =
  
negative.code:         
          watchUpdated.Trigger(mwv)
  
      ///Remove the given managed watch viewer, disposing the watch viewer's Control.
      member this.RemoveManagedWatchViewer(mwv) =
          mwv.WatchViewer.Control.Dispose()
          managedWatchViewers.Remove(mwv) |> ignore
          watchRemoved.Trigger(mwv)
  
      ///Remove the managed watch viewer by id, disposing the watch viewer's Control.
      member this.RemoveManagedWatchViewer(id:string) =
          let mwv = managedWatchViewers |> Seq.find(fun x -> x.ID = id)
          this.RemoveManagedWatchViewer(mwv)
  
      ///Remove the given managed plugin (and all of its managed watch viewers).
      member this.RemoveManagedPlugin(mp) =
          managedWatchViewers 
          |> Seq.filter (fun x -> x.ManagedPlugin = mp) 
          |> Seq.toList
          |> Seq.iter (fun x -> this.RemoveManagedWatchViewer(x))
  
          absoluteCounts.Remove(mp) |> ignore
          managedPlugins.Remove(mp) |> ignore
  
      ///Remove the managed plugin (and all of its managed watch viewers) by name.
      member this.RemoveManagedPlugin(name:string) =
          let mp = managedPlugins |> Seq.find(fun x -> x.Plugin.Name = name)
          this.RemoveManagedPlugin(mp)
  
      ///Register the given plugin and return the managed plugin wrapping it. If a managed plugin wrapping a plugin of the same name exists, 
      ///removes it (and all of its associated managed watch viewers).
      member this.RegisterPlugin(plugin:IPlugin) =
          match managedPlugins |> Seq.tryFind (fun x -> x.Plugin.Name = plugin.Name) with
          | Some(old_mp) -> this.RemoveManagedPlugin(old_mp)
          | None -> ()
               
          let mp = {Plugin=plugin; PluginManager=this}
          managedPlugins.Add(mp)
  