Logo Xantham

Session<'T> Type

A snapshot and a project, bound once. Of the wire's methods, most take `snapshot` and `project` as their first two arguments. They say which program is being asked, not what is being asked of it, and they do not vary across the calls a caller makes against one program - so `Session` holds them and the members below take only what is left. It is the same move `Node<'Tag>` makes for a source file and an index. The type parameter is the transport. `Session` answers synchronously and `Session` in `Async`; the member names and argument lists are identical, so the two differ only in what they return. Build one with `channel.Session(...)` or `mailbox.Session(...)`. Handles mean something only within the program that produced them, so a session is also the scope in which a symbol or type id is valid. A response that names a different project - `SymbolResponse.Project`, which the schema documents as the default for follow-up lookups - is followed with `ForSymbol`, not by passing a project argument.

Record fields

Record Field Description

Project

Full Usage: Project

Field type: string
Field type: string

Snapshot

Full Usage: Snapshot

Field type: int
Field type: int

Transport

Full Usage: Transport

Field type: 'T
Field type: 'T

Instance members

Instance member Description

this.ForSymbol

Full Usage: this.ForSymbol

Parameters:
Returns: Session<'T>

Retargets to the project a symbol was first observed in. Follow-up lookups on a symbol can vary by project, and the response carries the one to use.

symbol : SymbolResponse
Returns: Session<'T>

this.Sessionless

Full Usage: this.Sessionless

Returns: SessionlessApi<'T>

The methods that need neither the snapshot nor the project.

Returns: SessionlessApi<'T>

this.WithProject

Full Usage: this.WithProject

Parameters:
    project : string

Returns: Session<'T>

The same session against another project of the same snapshot.

project : string
Returns: Session<'T>

this.WithSnapshot

Full Usage: this.WithSnapshot

Parameters:
    snapshot : int

Returns: Session<'T>

The same session against another snapshot - what `Sessionless.updateSnapshot` hands back after a file changes.

snapshot : int
Returns: Session<'T>

Type something to start searching.