2 using System.ComponentModel.Composition;
3 using System.Diagnostics;
4 using System.Diagnostics.Contracts;
6 using Pithos.Interfaces;
7 using Pithos.ShellExtensions.Test;
9 namespace Pithos.ShellExtensions
11 //[Export(typeof(IStatusChecker))]
12 public class TestStatusChecker:IStatusChecker
15 private IPithosSettings Settings=new TestPithosSettings();
17 private readonly string[] _states = {"Normal", "Modified", "Conflict","Synch"};
19 public FileOverlayStatus GetFileOverlayStatus(string path)
21 if (String.IsNullOrWhiteSpace(path))
22 throw new ArgumentNullException("Empty path");
24 var pithosPath = Settings.PithosPath;
25 if (path.StartsWith(pithosPath,true,null))
27 var fileName = Path.GetFileName(path);
28 if (String.IsNullOrWhiteSpace(fileName))
29 return FileOverlayStatus.Normal;
31 var status = Char.ConvertToUtf32(fileName, 0)%4;
32 return (FileOverlayStatus)status;
34 return FileOverlayStatus.Unversioned;
38 //Not Used by the shell extensions
39 public PithosStatus GetPithosStatus()
41 throw new NotSupportedException();