Ejemplo 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();
        }
Ejemplo n.º 2
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);

            m_client = new HealthVaultClient(m_appInfo, m_serviceInfo, m_appSettings.UseWebAuthBroker);
            m_localVault = new LocalVault(this, appSettings.Folder, appSettings.Folder);
            m_vocabs = new Vocabs(this);
        }
        // We can't pass in a HealthVaultClient directly because it's not a WinRT class. :(
        public ServiceMethodProvider(HealthVaultAppSettings appSettings)
        {
            ServiceInfo serviceInfo = (ServiceInfo)ServiceFactory.CreateServiceInfo(
                "https://platform.healthvault-ppe.com/platform/wildcat.ashx",
                "https://account.healthvault-ppe.com");

            AppInfo appInfo = new AppInfo();
            appInfo.MasterAppId = Guid.Parse(appSettings.MasterAppId);
            appInfo.IsMultiInstanceAware = true;

            HealthVaultClient client = new HealthVaultClient(
                appInfo,
                serviceInfo,
                appSettings.IsFirstParty,
                appSettings.WebAuthorizer != null ? (IWebAuthorizer)appSettings.WebAuthorizer : null);

            m_serviceMethods = client.ServiceMethods;
        }