aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
blob: a7d08eb45b0e57d157e787e0f6acf7d681dfabd0 (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
using Tango.Core.DI;
using Tango.MachineStudio.Technician.ViewModels;

namespace Tango.MachineStudio.Technician
{
    /// <summary>
    /// This class contains static references to all the view models in the
    /// application and provides an entry point for the bindings.
    /// </summary>
    public static class ViewModelLocator
    {
        /// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        static ViewModelLocator()
        {
            TangoIOC.Default.Register<MachineTechViewVM>();
        }

        public static MachineTechViewVM MachineTechViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<MachineTechViewVM>();
            }
        }
    }
}
, DateTime expiration, T obj) { PartitionKey = MachineServiceConfig.REFRESH_TOKENS_TABLE_PARTITION; Identity = identity; AccessToken = accessToken; RefreshToken = refreshToken; Expiration = expiration; RefreshTokenEncoder<T> encoder = new RefreshTokenEncoder<T>(); Object = encoder.Encode(obj); } [IgnoreProperty] public String RefreshToken { get { return RowKey; } set { RowKey = value; } } public String Identity { get; set; } public String AccessToken { get; set; } public DateTime Expiration { get; set; } public String Object { get; set; } public T GetObject() { RefreshTokenEncoder<T> encoder = new RefreshTokenEncoder<T>(); return encoder.Decode(RefreshToken); } } }