/// <summary> /// Iterates the indexes of PHP array in entry. /// </summary> /// <param name="context">The context.</param> /// <param name="snapshotEntry">The snapshot entry.</param> /// <returns>The list of indexes in the given snapshot entry.</returns> public static IEnumerable <MemberIdentifier> IterateIndexes(SnapshotBase context, ICopyModelSnapshotEntry snapshotEntry) { Snapshot snapshot = SnapshotEntry.ToSnapshot(context); MemoryEntry entry = snapshotEntry.ReadMemory(snapshot); CollectComposedValuesVisitor visitor = new CollectComposedValuesVisitor(); visitor.VisitMemoryEntry(entry); return(visitor.CollectIndexes(snapshot)); }
/// <summary> /// Resolves the type of PHP objects in the entry. /// </summary> /// <param name="context">The context.</param> /// <param name="snapshotEntry">The snapshot entry.</param> /// <returns>The list of types in the given snapshot entry.</returns> public static IEnumerable <TypeValue> ResolveType(SnapshotBase context, ICopyModelSnapshotEntry snapshotEntry) { Snapshot snapshot = SnapshotEntry.ToSnapshot(context); MemoryEntry entry = snapshotEntry.ReadMemory(snapshot); CollectComposedValuesVisitor visitor = new CollectComposedValuesVisitor(); visitor.VisitMemoryEntry(entry); return(visitor.ResolveObjectsTypes(snapshot)); }