# SessionEntry class

Namespace: [Grasshopper2.Doc](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.doc.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class SessionEntry : IStorable
```

Records the state of a single open document at the time a session snapshot was written. One [SessionEntry](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry.md) is created per open document and stored within a [SessionRecord](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionrecord.md).

## Constructors

- [SessionEntry](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/ctor.md): (3 overloads) Construct a session entry for an unnamed document. The entry tracks the document by its runtime [Document.Identity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.document/identity.md) and points at the autosave file under [Folders.UnnamedFilesFolder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.folders/unnamedfilesfolder.md). Unnamed entries are always treated as modified since there is no on-disk original to fall back to.

## Properties

- [AutoSavePath](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/autosavepath.md): Full path to the autosave file written for this document at shutdown. For named entries: only meaningful when [SessionEntry.WasModified](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/wasmodified.md) is true. For unnamed entries: always set; restore loads from here.
- [Identity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/identity.md): Runtime identity of the document. Set only when [SessionEntry.Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md) is [SessionEntryKind.Unnamed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md). Used to reattach the same identity to the restored document so that successive autosaves continue to overwrite the same file under [Folders.UnnamedFilesFolder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.folders/unnamedfilesfolder.md).
- [Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md): Whether this entry describes a named (on-disk) document or an unnamed one.
- [OriginalLastWriteUtc](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/originallastwriteutc.md): Last-write timestamp (UTC) of the original file at the moment the session was written. Used during restore to detect external edits between sessions. Only meaningful when [SessionEntry.Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md) is [SessionEntryKind.Named](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md).
- [OriginalPath](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/originalpath.md): Full path to the original document on disk. Set only when [SessionEntry.Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md) is [SessionEntryKind.Named](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md).
- [ParentClusterId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/parentclusterid.md): InstanceId of the cluster object inside the parent document whose inner-doc edit this entry represents. Empty when [SessionEntry.ParentEntryIndex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/parententryindex.md) is -1. Only meaningful when [SessionEntry.Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md) is [SessionEntryKind.Unnamed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md).
- [ParentEntryIndex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/parententryindex.md): Index of the entry whose document contains the cluster being edited. -1 when this entry is a top-level document rather than a cluster inner doc. Only meaningful when [SessionEntry.Kind](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/kind.md) is [SessionEntryKind.Unnamed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md).
- [WasModified](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/wasmodified.md): True if the document had unsaved changes at the moment the session was written. For [SessionEntryKind.Unnamed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentrykind.md) entries this is always true; there is no on-disk original, so any unnamed document being captured must be restored from its autosave file.

## Methods

- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.sessionentry/store.md): Serialise this entry into the supplied writer.
