//Except where stated all code and programs in this project are the copyright of Jim Blackler, 2008.
//jimblackler@gmail.com
//
//This is free software. Libraries and programs are distributed under the terms of the GNU Lesser
//General Public License. Please see the files COPYING and COPYING.LESSER.
using System;
using System.Collections.Generic;
using ObjectEditors;
using System.Collections.ObjectModel;
namespace SVNWatch
{
///
/// An SVN repository being monitored
///
[Serializable]
public class Repository
{
///
/// The URL of the SVN repository to monitor
///
public string MonitorURL
{
get
{
return monitorURL;
}
set
{
monitorURL = value;
}
}
private string monitorURL;
///
/// The number of logs currently unviewed by the user
///
public int NumberUnseenLogs
{
get { return unseenLogs.Count; }
}
///
/// Information retrieved about the repository
///
internal info Info
{
get { return info; }
set { info = value; }
}
private info info;
///
/// The logs fetched in the last operation
///
internal logType LastFetchedLogs
{
get { return lastFetchedLogs; }
set { lastFetchedLogs = value; }
}
private logType lastFetchedLogs;
///
/// All the logs currently unseen by the user
///
internal List UnseenLogs
{
get { return unseenLogs; }
set { unseenLogs = value; }
}
private List unseenLogs = new List();
///
/// The time the logs were last obtained
///
public DateTime LastScan
{
get { return lastScan; }
internal set { lastScan = value; }
}
private DateTime lastScan;
///
/// The maximum number of logs to fetch in one operation
///
/// Some SVN repositories are very large!
public int MaximumFetch
{
get { return maximumFetch; }
set { maximumFetch = value; }
}
private int maximumFetch = 200;
///
/// The outcome of the previous scan operation
///
public string LastScanResult
{
get
{
return lastScanResult;
}
internal set
{
lastScanResult = value;
}
}
private string lastScanResult;
///
/// The last revision number obtained
///
public uint LastRevision
{
get
{
return lastRevision;
}
internal set
{
lastRevision = value;
}
}
private uint lastRevision;
///
/// 'True' if a scan has been manually requested on the repository
///
internal bool ScanDue
{
get { return scanDue; }
set { scanDue = value; }
}
[NonSerialized]
private bool scanDue = false;
///
/// Scan the repository now
///
[ObjectEditorInvoke]
public void ScanNow()
{
ScanDue = true;
}
}
}