public override DataComponent Remove(DataComponent component) { if (component is File) { filesCount--; } else if (component is Folder) { foldersCount--; } dataList.Remove(component); return(this); }
public override DataComponent Add(DataComponent component) { if (component is File) { filesCount++; } else if (component is Folder) { foldersCount++; } dataList.Add(component); return(this); }
public override DataComponent Remove(DataComponent component) { Console.WriteLine("Can't remove file from a file."); return(this); }
public override DataComponent Add(DataComponent component) { Console.WriteLine("Can't add file in a file."); return(this); }
public abstract DataComponent Remove(DataComponent c);
public abstract DataComponent Add(DataComponent c);