using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace mdfinder
{
public class FileRecord : PropertyChangedAlerter
{
#region Members
/// The identifier.
private string id;
/// Full pathname of the file.
private Uri path;
/// The size.
private long size;
/// The hash.
private string hash;
/// The hash provider.
private string hashProvider;
/// True to keep.
private bool keep;
#endregion Members
#region Properties
/// Gets or sets the identifier.
/// The identifier.
public string Id
{
get
{
return this.id;
}
set
{
this.id = value;
OnPropertyChanged();
}
}
/// Gets or sets the full pathname of the file.
/// The full pathname of the file.
public Uri Path
{
get
{
return this.path;
}
set
{
this.path = value;
OnPropertyChanged();
}
}
/// Gets or sets the size.
/// The size.
public long Size
{
get
{
return this.size;
}
set
{
this.size = value;
OnPropertyChanged();
}
}
/// Gets or sets the hash.
/// The hash.
public string Hash
{
get
{
return this.hash;
}
set
{
this.hash = value;
OnPropertyChanged();
}
}
/// Gets or sets the hash provider.
/// The hash provider.
public string HashProvider
{
get
{
return this.hashProvider;
}
set
{
this.hashProvider = value;
OnPropertyChanged();
}
}
/// Gets or sets a value indicating whether to keep the file when processing duplicates.
/// True if keep, false if not.
public bool Keep
{
get
{
return this.keep;
}
set
{
this.keep = value;
OnPropertyChanged();
}
}
#endregion Properties
#region Constructors
public FileRecord()
{
this.Id = string.Empty;
this.Path = default(Uri);
this.Size = 0;
this.Hash = string.Empty;
this.HashProvider = string.Empty;
}
/// Constructor.
/// Full pathname of the file.
/// The size.
/// The hash.
/// The hash provider.
public FileRecord(string path, long size, string hash, string hashProvider)
{
this.Id = Guid.NewGuid().ToString();
this.Path = new Uri(path);
this.Size = size;
this.Hash = hash;
this.HashProvider = hashProvider;
}
#endregion Constructors
}
}