/// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        public ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            ToggableNetworkInformation networkInfo = new ToggableNetworkInformation();

            SimpleIoc.Default.Register<INetworkInformation>(() => networkInfo);

            SimpleIoc.Default.Register<ICacheProvider, TimestampCacheProvider>();

            SimpleIoc.Default.Register<IStructuredStorage, SQLiteStructuredStorage>();

            SimpleIoc.Default.Register<NetworkInformationDelegate>(() =>
            {
                return new NetworkInformationDelegate(() => networkInfo.IsOnline, b => networkInfo.IsOnline = b);
            });

            SimpleIoc.Default.Register<MainViewModel>();

            DelegatingHandler handler = new CacheHandler(SimpleIoc.Default.GetInstance<ICacheProvider>());
                        
            // This MobileServiceClient has been configured to communicate with your Mobile Service's url
            // and application key. You're all set to start working with your Mobile Service!
            MobileServiceClient MobileService = new MobileServiceClient(
                "https://YOURAPP.azure-mobile.net/",
                "YOURKEY",
                handler
            );

            SimpleIoc.Default.Register<IMobileServiceClient>(() => MobileService);
        }
        /// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        public ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            ToggableNetworkInformation networkInfo = new ToggableNetworkInformation();

            SimpleIoc.Default.Register<INetworkInformation>(() => networkInfo);

            SimpleIoc.Default.Register<IStructuredStorage>(() => new SQLiteStructuredStorage("cache"));
            SimpleIoc.Default.Register<ISynchronizer, TimestampSynchronizer>();
            SimpleIoc.Default.Register<Func<Uri, bool>>(() => (u => true));
            //SimpleIoc.Default.Register<ICacheProvider, DisabledCacheProvider>();
            SimpleIoc.Default.Register<ICacheProvider, TimestampCacheProvider>();

            SimpleIoc.Default.Register<NetworkInformationDelegate>(() =>
            {
                return new NetworkInformationDelegate(() => networkInfo.IsOnline, b => networkInfo.IsOnline = b);
            });

            SimpleIoc.Default.Register<MainViewModel>();

            DelegatingHandler handler = new CacheHandler(SimpleIoc.Default.GetInstance<ICacheProvider>());

            // Configure your mobile service here
            MobileServiceClient MobileService = new MobileServiceClient(
                Constants.MobileServiceUrl,
                Constants.MobileServiceKey,
                handler
            );

            SimpleIoc.Default.Register<IMobileServiceClient>(() => MobileService);
        }