// Methods /// <summary> /// A list of TopicChanges to a topic since a given date [sorted by date] /// </summary> /// <param name="stamp">Specifies that we are only interested in changes after this date.</param> /// <param name="stamp">A non-null timestamp; changes before this time won't be included in the answer </param> /// <returns>Enumeration of TopicChanges</returns> /// <remarks>Returns a collection with zero elements in it when the topic name does not exist, or has been deleted, /// or if the calling user does not have the <see cref="Permission.Read"/> permission.</remarks> public override TopicChangeCollection AllChangesForTopicSince(UnqualifiedTopicName topic, DateTime stamp) { TopicChangeCollection answer = new TopicChangeCollection(); FileInformationCollection infos = FileInfosForTopic(topic.LocalName); ArrayList sortable = new ArrayList(); foreach (IFileInformation each in infos) { sortable.Add(new FileInfoTopicData(each, Namespace)); } sortable.Sort(new TimeSort()); foreach (TopicData each in sortable) { if (each.LastModificationTime < stamp) { continue; } QualifiedTopicRevision name = new QualifiedTopicRevision(topic.ResolveRelativeTo(Namespace)); name.Version = each.Version; // Version might be null if we grabbed the .wiki file instead of a .awiki file if (each.Version == null) { answer.Add(new TopicChange(name, each.LastModificationTime, "")); } else { TopicChange change = TopicChangeFromName(name); answer.Add(change); } } return answer; }
// Methods /// <summary> /// A list of TopicChanges to a topic since a given date [sorted by date] /// </summary> /// <param name="stamp">Specifies that we are only interested in changes after this date.</param> /// <param name="stamp">A non-null timestamp; changes before this time won't be included in the answer </param> /// <returns>Enumeration of TopicChanges</returns> /// <remarks>Returns a collection with zero elements in it when the topic name does not exist, or has been deleted, /// or if the calling user does not have the <see cref="Permission.Read"/> permission.</remarks> public override TopicChangeCollection AllChangesForTopicSince(UnqualifiedTopicName topic, DateTime stamp) { TopicChangeCollection answer = new TopicChangeCollection(); FileInfo[] infos = FileInfosForTopic(topic.LocalName); ArrayList sortable = new ArrayList(); foreach (FileInfo each in infos) { sortable.Add(new FileInfoTopicData(each, Namespace)); } sortable.Sort(new TimeSort()); foreach (TopicData each in sortable) { if (each.LastModificationTime < stamp) { continue; } QualifiedTopicRevision name = new QualifiedTopicRevision(topic.ResolveRelativeTo(Namespace)); name.Version = each.Version; TopicChange change = TopicChangeFromName(name); answer.Add(change); } return answer; }