/// <inheritdoc /> public IWriteableIndexContainer getWriteableSourceContainer() { if (builder == null) { builder = arrayDescriptor.Builder(strucure); } return(builder); }
/// <summary> /// Tests the and create undefined children. /// </summary> /// <param name="node">The node.</param> private void testAndCreateUndefinedChildren(MemoryCollectorNode node) { if (node.HasUndefinedChildren) { AssociativeArray arrayValue = Structure.GetArray(node.TargetIndex); IArrayDescriptor oldDescriptor = Structure.GetDescriptor(arrayValue); IArrayDescriptorBuilder builder = oldDescriptor.Builder(Structure); foreach (var newChild in node.UndefinedChildren) { string childName = newChild.Item1; MemoryCollectorNode childNode = newChild.Item2; MemoryIndex index = node.TargetIndex.CreateIndex(childName); childNode.TargetIndex = index; builder.AddIndex(childName, index); } IArrayDescriptor newDescriptor = builder.Build(Structure); Structure.SetDescriptor(arrayValue, newDescriptor); } }