internal LocalVault(HealthVaultApp app, IObjectStore vocabStore, IObjectStore recordStore)
 {
     m_app = app;
     m_vocabRoot = vocabStore;
     m_recordRoot = recordStore;
     m_vocabStore = new LocalVocabularyStore(m_app, m_vocabRoot);
     m_recordStores = new LocalRecordStoreTable(m_recordRoot);
 }
コード例 #2
0
 internal Vocabs(HealthVaultApp app)
 {
     m_app = app;
 }
 internal LocalVault(HealthVaultApp app, StorageFolder vocabFolder, StorageFolder recordFolder)
     : this(app, FolderObjectStore.CreateRoot(vocabFolder), FolderObjectStore.CreateRoot(recordFolder))
 {
 }
 internal LocalVault(HealthVaultApp app)
     : this(app, FolderObjectStore.CreateRoot(), FolderObjectStore.CreateRoot())
 {
 }
        public static IAsyncOperation<IList<ItemTypeDefinition>> GetItemTypeDefinitions(HealthVaultApp app, ThingTypeGetParams getParams)
        {
            return AsyncInfo.Run<IList<ItemTypeDefinition>>(
                async cancelToken =>
                {
                    string xml = getParams.ToXml();
                    
                    // Strip off the <ThingTypeGetParams> root node
                    // because all of its properties should be nested under <info> (RequestBody)
                    var doc = new XmlDocument();
                    doc.LoadXml(xml);
                    var innerXml = new StringBuilder();
                    if (doc.ChildNodes != null && doc.ChildNodes.Length == 1)
                    {
                        var innerNodes = doc.ChildNodes[0].ChildNodes;
                        foreach (IXmlNode node in innerNodes)
                        {
                            innerXml.Append(node.GetXml());
                        }
                    }

                    ThingTypeGetResults result =
                        await app.Client.ServiceMethods.GetThingType<ThingTypeGetResults>(innerXml.ToString(), cancelToken);
                    return result.ItemTypeDefinitions;
                });
        }
 internal Vocabs(HealthVaultApp app)
 {
     m_app = app;
 }