// tagList gets filled! internal static Photo FromString(string element, TagDatabase tagDB, HashSet <Tag> emptyTagList) { string[] parts = element.Split(Constants.splitChar); string[] tagIDs = parts[1].Split(Constants.subSplitChar); for (int i = 0; i < tagIDs.Length; i++) { emptyTagList.Add(tagDB.GiveTag(Int32.Parse(tagIDs[i]))); } return(new Photo(parts[0], DateTime.Parse(parts[2]), emptyTagList)); }
public void doAddTag(Photo photo, string tag) { photoDatabase.addTag(photo, tagDatabase.GiveTag(tag)); }