/// <summary> /// Collects the index of the index from memory. /// </summary> /// <param name="collector">The collector.</param> /// <param name="indexSegment">The index segment.</param> /// <param name="index">The index.</param> protected void CollectIndexFromMemoryIndex(TreeIndexCollector collector, IndexPathSegment indexSegment, MemoryIndex index) { MemoryEntry entry = collector.GetMemoryEntry(index); this.ContainsUndefinedValue = entry.ContainsUndefinedValue; bool processOtherValues = false; AssociativeArray arrayValue; if (collector.Structure.TryGetArray(index, out arrayValue)) { if (entry.ContainsUndefinedValue) { processOtherValues = entry.Count > 2; } else { processOtherValues = entry.Count > 1; } IArrayDescriptor descriptor = collector.Structure.GetDescriptor(arrayValue); collector.CollectSegmentFromStructure(indexSegment, this, descriptor, !processOtherValues); } else if (entry.ContainsUndefinedValue) { processOtherValues = entry.Count > 1; this.HasNewImplicitArray = true; collector.CollectSegmentWithoutStructure(indexSegment, this, !processOtherValues); } else { processOtherValues = true; } if (processOtherValues) { collector.CollectIndexSegmentFromValues(indexSegment, this, entry.PossibleValues, true); } }
public void Collect(TreeIndexCollector collector, PathSegment pathSegment) { collector.CollectSegmentFromStructure(pathSegment, this, indexContainer, true); }