Added json serialization of permissions in PermissionConverter.cs
[pithos-ms-client] / trunk / Pithos.Client.WPF / Services / StatusService.cs
1 // -----------------------------------------------------------------------
2 // <copyright file="StatusService.cs" company="Microsoft">
3 // TODO: Update copyright text.
4 // </copyright>
5 // -----------------------------------------------------------------------
6
7
8 using Caliburn.Micro;
9 using System.ServiceModel;
10 using System.ComponentModel.Composition;
11 using Pithos.Core;
12 using Pithos.Interfaces;
13
14 namespace Pithos.Client.WPF.Services
15 {
16     /// <summary>
17     /// TODO: Update summary.
18     /// </summary>
19     [ServiceBehavior(UseSynchronizationContext=false, IncludeExceptionDetailInFaults = true)]
20     [Export]
21     public class StatusService : IStatusService,ISettingsService, ICommandsService
22     {
23         [Import]
24         public IPithosSettings Settings { get; set; }
25
26         [Import]
27         public IStatusChecker Checker { get; set; }
28
29         [Import]
30         public PithosMonitor Monitor { get; set; }
31
32         public StatusService()
33         {
34             IoC.BuildUp(this);
35         }
36
37         private IEventAggregator _events;
38
39         [ImportingConstructor]
40         public StatusService(IStatusChecker checker,IEventAggregator events)
41         {
42             Checker = checker;
43             _events = events;
44         }
45
46
47         public FileOverlayStatus GetStatus(string filePath)
48         {
49             return Checker.GetFileOverlayStatus(filePath);
50         }
51
52         public void DisplayProperties(string filePath)
53         {
54             //Monitor.
55         }
56
57         public PithosSettingsData GetSettings()
58         {
59             var data = new PithosSettingsData(Settings);
60             return data;
61         }
62
63         public void ShowProperties(string fileName)
64         {
65             _events.Publish(new ShowFilePropertiesEvent(fileName));
66         }
67     }
68 }