Пример #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 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();
        }
        // 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://chbaseplatform-ppev2.dev.grcdemo.com/platform/wildcat.ashx",
                "https://chbase-ppev2.dev.grcdemo.com");

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

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

            m_serviceMethods = client.ServiceMethods;
        }