Statistics
| Branch: | Revision:

root / trunk / Pithos.Core / StatusService.cs @ 5bcf6d70

History | View | Annotate | Download (1.4 kB)

1
// -----------------------------------------------------------------------
2
// <copyright file="StatusService.cs" company="Microsoft">
3
// TODO: Update copyright text.
4
// </copyright>
5
// -----------------------------------------------------------------------
6

    
7
using Caliburn.Micro;
8

    
9
namespace Pithos.Core
10
{
11
    using System;
12
    using System.Collections.Generic;
13
    using System.Linq;
14
    using System.Text;
15
    using System.ServiceModel;
16
    using System.ComponentModel.Composition;
17
    using Pithos.Interfaces;
18

    
19
    /// <summary>
20
    /// TODO: Update summary.
21
    /// </summary>
22
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
23
    [Export]
24
    public class StatusService : IStatusService,ISettingsService
25
    {
26
        [Import]
27
        public IPithosSettings Settings { get; set; }
28

    
29
        [Import]
30
        public IStatusChecker Checker { get; set; }
31

    
32
        public StatusService()
33
        {
34
            IoC.BuildUp(this);
35
        }
36

    
37
        [ImportingConstructor]
38
        public StatusService(IStatusChecker checker)
39
        {
40
            Checker = checker;
41
        }
42

    
43

    
44
        public FileOverlayStatus GetStatus(string filePath)
45
        {
46
            return Checker.GetFileOverlayStatus(filePath);
47
        }
48

    
49
        public PithosSettingsData GetSettings()
50
        {
51
            var data = new PithosSettingsData(Settings);
52
            return data;
53
        }
54
    }
55
}