summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/ServiceManager.cs
blob: e0ad65ae50544d3c832467baefef55450d675516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace HandBrake.ApplicationServices
{
    using HandBrake.ApplicationServices.Services;
    using HandBrake.ApplicationServices.Services.Interfaces;
    using HandBrake.Interop;

    /// <summary>
    /// Tempory Class which manages services until Windosor is added back into the project to handle it for us.
    /// </summary>
    public class ServiceManager
    {
        /// <summary>
        /// Backing Field for the User Setting Service.
        /// </summary>
        private static IUserSettingService userSettingService;

        /// <summary>
        /// The Backing field for HandBrake Instance.
        /// </summary>
        private static HandBrakeInstance handBrakeInstance;

        /// <summary>
        /// Gets UserSettingService.
        /// </summary>
        public static IUserSettingService UserSettingService
        {
            get
            {
                return userSettingService ?? (userSettingService = new UserSettingService());
            }
        }

        /// <summary>
        /// Gets HandBrakeInstance.
        /// </summary>
        public static HandBrakeInstance HandBrakeInstance
        {
            get
            {
                return handBrakeInstance ?? (handBrakeInstance = new HandBrakeInstance());
            }
        }
    }
}