Ejemplo n.º 1
0
        protected virtual void OnAddinReferenceAdded(AddinReferenceEventArgs args)
        {
            var evt = AddinReferenceAdded;

            if (evt != null)
            {
                evt(this, args);
            }
        }
 void OnReferencesChanged(object sender, AddinReferenceEventArgs e)
 {
     foreach (var project in e.Select(x => x.Project).Distinct())
     {
         ITreeBuilder builder = Context.GetTreeBuilder(project);
         if (builder != null)
         {
             builder.UpdateChildren();
         }
     }
 }
Ejemplo n.º 3
0
        protected override void OnItemsRemoved(IEnumerable <ProjectItem> objs)
        {
            base.OnItemsRemoved(objs);

            var addinRefs = objs.OfType <AddinReference> ().ToList();

            if (addinRefs.Count == 0)
            {
                return;
            }

            var args = new AddinReferenceEventArgs();

            foreach (var item in addinRefs)
            {
                item.OwnerProject = null;
                args.AddInfo(this, item);
            }
            OnAddinReferenceRemoved(args);
        }