Was.OrcSearch – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System; |
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using Was.OrcSearch.Models.Interfaces; |
||
5 | |||
6 | namespace Was.OrcSearch.Models |
||
7 | { |
||
8 | public class DictionaryMetadataCollection : MetadataCollectionBase |
||
9 | { |
||
10 | private readonly List<IMetadata> _metadata; |
||
11 | |||
12 | public DictionaryMetadataCollection() |
||
13 | { |
||
14 | _metadata = new List<IMetadata>(); |
||
15 | } |
||
16 | |||
17 | public DictionaryMetadataCollection(Dictionary<string, Type> dictionarySchema) |
||
18 | : this() |
||
19 | { |
||
20 | _metadata = dictionarySchema.Select(kvp => new DictionaryMetadata(kvp.Key, kvp.Value)).Cast<IMetadata>() |
||
21 | .ToList(); |
||
22 | } |
||
23 | |||
24 | public override IEnumerable<IMetadata> All => _metadata; |
||
25 | } |
||
26 | } |