public IEnumerable <EntryData> GetEntries() { //First we need the chain head. var chainhead = new ChainHead(FactomD); chainhead.Run(ChainID); //Now we can get the last entry block var eblock = new EntryBlock(FactomD); eblock.Run(chainhead.Result.result.chainHead); while (true) { //iterate each entry hash foreach (var entryitem in eblock.Result.result.entrylist) { //Get the entry, and yield var entry = new Entry(FactomD); entry.Run(entryitem.Entryhash); yield return(entry.Result.result.EntryData); } //Is there a previous entry/block to read? if (String.IsNullOrEmpty(eblock.Result.result.header.Prevkeymr)) { break; } //Request block eblock.Run(eblock.Result.result.header.Prevkeymr); } }
public EditVariableBindingModel(ChainHead head, VariableBinding variable) { this.head = head; this.variable = variable; }