Esempio n. 1
0
        public HealthVaultApp(HealthVaultAppSettings appSettings)
        {
            m_lock = new object();

            m_appSettings = appSettings;
            m_serviceInfo = new ServiceInfoProxy()
            {
                ShellUrl   = appSettings.ShellUrl,
                ServiceUrl = appSettings.ServiceUrl
            };
            m_startupStatus = AppStartupStatus.Cancelled;
            m_appInfo       = new AppInfoProxy(appSettings.MasterAppId, appSettings.IsMultiInstanceAware);

            m_client = new HealthVaultClient(
                m_appInfo,
                m_serviceInfo,
                appSettings.IsFirstParty,
                appSettings.WebAuthorizer != null ? (IWebAuthorizer)appSettings.WebAuthorizer : null);

            if (appSettings.IsFirstParty)
            {
                m_liveIdHostName        = appSettings.LiveIdHostName;
                m_client.LiveIdHostName = appSettings.LiveIdHostName;
            }

            m_localVault = new LocalVault(this, appSettings.Folder, appSettings.Folder);
            m_vocabs     = new Vocabs(this);

            UIThreadDispatcher.Current.Init();
        }
Esempio n. 2
0
        private void HandleEncryptionSetCache()
        {
            // Set up the encrypted local vault
            if (m_appSettings.UseEncryption)
            {
                var encryptedStore = new EncryptedObjectStore(
                    FolderObjectStore.CreateRoot(m_appSettings.Folder),
                    Client.Cryptographer,
                    Client.State.ProvisioningInfo.SharedSecret);

                m_localVault = new LocalVault(
                    this,
                    FolderObjectStore.CreateRoot(m_appSettings.Folder),
                    encryptedStore);
            }

            // Set the cache setting
            m_localVault.RecordStores.MaxCachedItems = m_appSettings.MaxCachedItems;
        }
        public HealthVaultApp(HealthVaultAppSettings appSettings)
        {
            m_lock = new object();

            m_appSettings = appSettings;
            m_serviceInfo = new ServiceInfoProxy()
            {
                ShellUrl = appSettings.ShellUrl,
                ServiceUrl = appSettings.ServiceUrl
            };
            m_startupStatus = AppStartupStatus.Cancelled;
            m_appInfo = new AppInfoProxy(appSettings.MasterAppId, appSettings.IsMultiInstanceAware);

            m_client = new CHBaseClient(
                m_appInfo,
                m_serviceInfo,
                appSettings.IsFirstParty,
                appSettings.WebAuthorizer != null ? (IWebAuthorizer)appSettings.WebAuthorizer : null);

            if (appSettings.IsFirstParty)
            {
                m_liveIdHostName = appSettings.LiveIdHostName;
                m_client.LiveIdHostName = appSettings.LiveIdHostName;
            }

            m_localVault = new LocalVault(this, appSettings.Folder, appSettings.Folder);
            m_vocabs = new Vocabs(this);
            
            UIThreadDispatcher.Current.Init();
        }
        private void HandleEncryptionSetCache()
        {
            // Set up the encrypted local vault
            if (m_appSettings.UseEncryption)
            {
                var encryptedStore = new EncryptedObjectStore(
                    FolderObjectStore.CreateRoot(m_appSettings.Folder),
                    Client.Cryptographer,
                    Client.State.ProvisioningInfo.SharedSecret);

                m_localVault = new LocalVault(
                    this,
                    FolderObjectStore.CreateRoot(m_appSettings.Folder),
                    encryptedStore);
            }

            // Set the cache setting
            m_localVault.RecordStores.MaxCachedItems = m_appSettings.MaxCachedItems;
        }