using System; using System.ComponentModel.Composition; using System.Diagnostics; using System.Diagnostics.Contracts; using System.IO; using Pithos.Interfaces; using Pithos.ShellExtensions.Test; namespace Pithos.ShellExtensions { //[Export(typeof(IStatusChecker))] public class TestStatusChecker:IStatusChecker { private IPithosSettings Settings=new TestPithosSettings(); private readonly string[] _states = {"Normal", "Modified", "Conflict","Synch"}; public FileOverlayStatus GetFileOverlayStatus(string path) { if (String.IsNullOrWhiteSpace(path)) throw new ArgumentNullException("Empty path"); var pithosPath = Settings.PithosPath; if (path.StartsWith(pithosPath,true,null)) { var fileName = Path.GetFileName(path); if (String.IsNullOrWhiteSpace(fileName)) return FileOverlayStatus.Normal; var status = Char.ConvertToUtf32(fileName, 0)%4; return (FileOverlayStatus)status; } return FileOverlayStatus.Unversioned; } //Not Used by the shell extensions public PithosStatus GetPithosStatus() { throw new NotSupportedException(); } } }