internal Entries ToEntries() { var es = new Entries(); // is it the sum of all the various items? if (Items.Count > 0) { es.Count = (uint)Items.Count; } foreach (var pair in Items) { switch (pair.Type) { case SLEntriesItemsType.Missing: es.Append(MissingItems[pair.Index].ToMissingItem()); break; case SLEntriesItemsType.Number: es.Append(NumberItems[pair.Index].ToNumberItem()); break; case SLEntriesItemsType.Error: es.Append(ErrorItems[pair.Index].ToErrorItem()); break; case SLEntriesItemsType.String: es.Append(StringItems[pair.Index].ToStringItem()); break; } } return(es); }
public PackageDescriptor(IEnumerable <IPackageDescriptorEntry> entries) { foreach (var line in entries) { Entries.Append(line); } InitializeHeaders(); }
internal Entries ToEntries() { Entries es = new Entries(); // is it the sum of all the various items? if (this.Items.Count > 0) es.Count = (uint)this.Items.Count; foreach (SLEntriesItemsTypeIndexPair pair in this.Items) { switch (pair.Type) { case SLEntriesItemsType.Missing: es.Append(this.MissingItems[pair.Index].ToMissingItem()); break; case SLEntriesItemsType.Number: es.Append(this.NumberItems[pair.Index].ToNumberItem()); break; case SLEntriesItemsType.Error: es.Append(this.ErrorItems[pair.Index].ToErrorItem()); break; case SLEntriesItemsType.String: es.Append(this.StringItems[pair.Index].ToStringItem()); break; } } return es; }