void OnChangedStructureEvent(IGroupTreeItem item, IList <string> path, RegistryActionEnum action) { ChangedStructureEvent?.Invoke(this, new GroupTreeStructureChangedEventArg(item, action) { Path = path }); }
public GroupTreeStructureChangedEventArg(IGroupTreeItem item, RegistryActionEnum action) { Action = action; switch (item) { case IGroup group: Item = new GroupProjection(group); break; case IContainer container: Item = new ContainerProjection(container); break; default: throw new ArgumentException("Unknown type"); } }