public SentenceAsm(AssemblyBase srcAsm) : base(srcAsm) { this.srcAsm = srcAsm; var store = Session.Instance().Store; var wordIDs = (List <long>)srcAsm.GetValue("Words"); int i = 0; if (wordIDs != null) { foreach (var ID in wordIDs) { var asm = store.GetAssembly(ID, false); var word = new WordAsm(asm); word.Order = i++; words.Add((int)word.Order, word); } } var syntIDs = (List <long>)srcAsm.GetValue("SyntNodes"); if (syntIDs != null) { foreach (var ID in syntIDs) { var asm = store.GetAssembly(ID, false); var syntNode = new SyntNodeAsm(asm); treeList.Add(syntNode); } } this.sentence = RestorePhrase(); this.IsActual = true; }
/// <summary> /// Добавление синт.узла во внутреннее хранилище. /// </summary> /// <param name="node">объект типа SyntNodeAsm</param> /// <returns></returns> public void AddNode(SyntNodeAsm node) { treeList.Add(node); }