public IAsyncOperation <RecordItem> GetItemAsync( ItemKey key, string versionType, ItemSectionType sections) { if (key == null) { throw new ArgumentNullException("key"); } ItemQuery query = ItemQuery.QueryForKey(key); query.View = new ItemView(sections); if (!String.IsNullOrEmpty(versionType)) { query.View.TypeVersions.Add(versionType); } return(AsyncInfo.Run( async cancelToken => { ItemQueryResult result = await GetItemsAsync(query).AsTask(cancelToken); return result.FirstItem; } )); }
private void UpdateSections(ItemSectionType section) { StringCollection sections = Sections; if ((section & ItemSectionType.Core) != 0) { sections.Add(ItemSections.Core); } if ((section & ItemSectionType.Audits) != 0) { sections.Add(ItemSections.Audits); } if ((section & ItemSectionType.Blobs) != 0) { sections.Add(ItemSections.Blobs); } if ((section & ItemSectionType.Tags) != 0) { sections.Add(ItemSections.Tags); } if ((section & ItemSectionType.EffectivePermissions) != 0) { sections.Add(ItemSections.Permissions); } if ((section & ItemSectionType.Signatures) != 0) { sections.Add(ItemSections.Signatures); } if ((section & ItemSectionType.Data) != 0) { UpdateXml(string.Empty); } }
public IAsyncOperation<RecordItem> GetItemAsync( ItemKey key, string versionType, ItemSectionType sections) { if (key == null) { throw new ArgumentNullException("key"); } ItemQuery query = ItemQuery.QueryForKey(key); query.View.SetSections(sections); if (!String.IsNullOrEmpty(versionType)) { query.View.TypeVersions.Add(versionType); } return AsyncInfo.Run( async cancelToken => { ItemQueryResult result = await GetItemsAsync(query).AsTask(cancelToken); return result.FirstItem; } ); }
public IAsyncOperation<RecordItem> GetItemAsync(ItemKey key, ItemSectionType sections) { return GetItemAsync(key, null, sections); }
public IAsyncOperation <RecordItem> GetItemAsync(ItemKey key, ItemSectionType sections) { return(m_record.GetItemAsync(key, sections)); }
public IAsyncOperation <RecordItem> GetItemAsync(ItemKey key, ItemSectionType sections) { this.ProduceError(); return(m_innerStore.GetItemAsync(key, sections)); }
public void SetSections(ItemSectionType types) { UpdateSections(types); }
public ItemView(ItemSectionType types) { SetSections(types); }
public IAsyncOperation<RecordItem> GetItemAsync(ItemKey key, ItemSectionType sections) { this.ProduceError(); return m_innerStore.GetItemAsync(key, sections); }