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"); } }
public GroupTreeItemNameChangedEventArg(IGroupTreeItem item, string oldName, string newName) { switch (item) { case IGroup group: Item = new GroupProjection(group); break; case IContainer container: Item = new ContainerProjection(container); break; default: throw new ArgumentException("Unknown type"); } OldName = oldName; NewName = newName; }