2 using System.ComponentModel.Composition;
3 using System.Diagnostics;
4 using System.Diagnostics.Contracts;
6 using Pithos.Interfaces;
8 namespace Pithos.ShellExtensions
10 [Export(typeof(IStatusChecker))]
11 public class TestStatusChecker:IStatusChecker
14 private IPithosSettings Settings;
16 private readonly string[] _states = {"Normal", "Modified", "Conflict","Synch"};
18 public string GetFileStatus(string path)
20 Contract.Requires(!String.IsNullOrWhiteSpace(path));
21 var pithosPath = Settings.PithosPath;
22 if (path.StartsWith(pithosPath,true,null))
24 var fileName = Path.GetFileName(path);
25 if (String.IsNullOrWhiteSpace(fileName))
28 var status = Char.ConvertToUtf32(fileName, 0)%4;
29 return _states[status];