void ProjectItemsEvents_ItemRenamed(ProjectItem projectItem, string oldName) { if (projectItem.WasJiss(oldName)) { // renamed from jiss file to something else (could still be jiss file but with another name) _core.Unload(projectItem); } if (projectItem.IsJiss()) { // If renamed to jiss file _core.Load(projectItem); } // What if it WasJiss ? should it then execute before Unload ? The jiss file being unloaded could be listning to rename of it self ? ... who cares ... var project = projectItem.ContainingProject; _core.Execute(project, x => x.ProjectItemRenamed(projectItem, oldName)); }
void ProjectItemsEvents_ItemRemoved(ProjectItem projectItem) { if (projectItem.IsJiss()) { _core.Unload(projectItem); } // Execute event for all or only if is Project Item File ? var project = projectItem.ContainingProject; _core.Execute(project, x => x.ProjectItemRemoved(projectItem)); }