public void TransferToChain(int index, ExecuteableCodeblockChain target, int targetIndex) { IExecuteableCodeblock item = this[index]; target.Insert(targetIndex, item); this.RemoveAt(index); }
public void TransferToChain(int index, int count, ExecuteableCodeblockChain target, int targetIndex) { IEnumerable <IExecuteableCodeblock> items = GetRange(index, count); target.InsertRange(targetIndex, items); this.RemoveRange(index, count); }
public CodeblockTree() { Logger = new ConsoleLogger(); MainChain = new ExecuteableCodeblockChain(); LooseChains = new List <ExecuteableCodeblockChain>(); }
private JObject SerializeCodeblockChainToJObject(ExecuteableCodeblockChain chain) { JArray items = new JArray(chain.Select(b => SerializeCodeblockToJObject(b as Codeblock)).ToArray()); JObject obj = new JObject { { "items", items } }; return(obj); }
public string SerializeCodeblockChain(ExecuteableCodeblockChain chain) => SerializeCodeblockChainToJObject(chain).ToString(SerializerSettings.ToJsonSettings().Formatting);