Grasshopper2.Frameworknamespace

Types

Grasshopper2.Framework.FailureInfo
Collation of data fields describing a particular load failure.
Grasshopper2.Framework.FailureKind
Enumerates the possible ways in which a plugin can fail to load.
Grasshopper2.Framework.FleetingPlugin
A plugin which was installed for the lifetime of a single file, and the package folder which is to be deleted again once it has served its purpose.
Grasshopper2.Framework.FleetingPlugins
Tracks plugins which were installed only so that one particular file could be opened, and which are to be removed again once they have served that purpose.

Two things happen to a fleeting plugin. It is loaded like any other plugin, because a document cannot be read without it, but its objects are kept out of the icon panels and out of search — the user asked for a file, not for a new set of components. And the package behind it is deleted from disk again.

The deletion cannot happen while Grasshopper runs. .NET offers no way to unload an assembly from the process, so the earliest a package can go is at shutdown, and on Windows not even then, since the file is still mapped. So the packages to delete are written to a ledger in the settings folder, that ledger is worked through at every startup before any plugin is scoped, and entries survive there until the deletion actually succeeds. A session which crashes therefore still cleans up after itself on the next launch.

Grasshopper2.Framework.FunctionProxies
Collection of all loaded function proxies.
Grasshopper2.Framework.FunctionProxy
A proxy holding all required information about a certain Function.
Grasshopper2.Framework.GeneralProxy<T>
Base class for creating type proxies.
Grasshopper2.Framework.GrasshopperCorePlugin
Plugin implementation for the core assembly.
Grasshopper2.Framework.LoadState
Enumerates the stages of the Grasshopper startup sequence, in order.
Grasshopper2.Framework.NameDescription
Grasshopper2.Framework.ObjectProxies
Collection of all loaded document object proxies.
Grasshopper2.Framework.ObjectProxies.Chapter
Provides enumeration functionality for sections in the ObjectServer.
Grasshopper2.Framework.ObjectProxies.Section
Provides enumeration functionality for proxies in the ObjectServer.
Grasshopper2.Framework.ObjectProxy
A proxy holding all required information about a certain type of Document object.
Grasshopper2.Framework.PackageOffer
What the package server can do about one missing plugin.

Establishing this takes a round trip to the server, so it is done once, in the background, and the answer is carried around afterwards. An offer which is not PackageOffer.IsAvailable names the reason in PackageOffer.Obstacle, which is what the user is shown in place of a button they cannot press.

Grasshopper2.Framework.PackageRestore
Fetches the plugins a document needs but does not have.

This happens in two steps, deliberately. PackageRestore.Offer(PluginRequirement) asks the package server what it can supply, which is what allows the user to be shown a button only when pressing it would achieve something. PackageRestore.Restore(PackageOffer, bool, IProgress<string>) then acts on an offer without going back to the server to ask the same questions again.

A restore can be permanent, which is an ordinary installation the user keeps, or fleeting, which lasts only as long as this session and leaves the plugin's objects out of the icon panels — see FleetingPlugins. The mechanics are identical either way; only the bookkeeping differs.

Grasshopper2.Framework.Performance
Grasshopper2.Framework.Plugin
Every grasshopper plugin assembly must implement a single public type with a public, parameter-less constructor derived from this class.
Grasshopper2.Framework.PluginEventArgs
Event arguments used for plugin server changes.
Grasshopper2.Framework.PluginKind
Enumerates the different types of plugin file that Grasshopper might load.
Grasshopper2.Framework.PluginRequirement
A record of one plugin which a document relied on at the moment it was saved. Documents store these so a later session can find out what is missing — and offer to fetch it — before deserialisation starts discarding objects whose types it cannot resolve.
Grasshopper2.Framework.PluginRequirements
The complete set of plugins a document relied on when it was saved, stored in the GHZ file so that opening it can establish what is missing before deserialisation quietly discards every object it cannot resolve.

This supersedes the Plugins.txt entry which earlier versions wrote and which nothing ever read.

Grasshopper2.Framework.Plugins
Immutable collection of plugin data.
Grasshopper2.Framework.PluginServer
Central repository for all loaded plugins.
Grasshopper2.Framework.PluginServerGridView
A tree grid view for browsing the state of plugins.
Grasshopper2.Framework.PluginState
Enumerates the possible states a GHP plugin can assume.
Grasshopper2.Framework.PluginStore
An Eto UI store for loaded plugins.
Grasshopper2.Framework.PluginStoreButton
A button label on the plugin grid.
Grasshopper2.Framework.PluginStoreEventArgs
Event arguments used in the PluginStore.PluginStateChanged event.
Grasshopper2.Framework.PluginStoreFilter
Enumerates the possible elements the PluginStore can include.
Grasshopper2.Framework.Query
A single fragment in a query string.
Grasshopper2.Framework.QueryType
Enumerates the various kinds of queries.
Grasshopper2.Framework.RestoreOutcome
Enumerates how an attempt to restore one missing plugin ended.
Grasshopper2.Framework.RestoreReport
What became of one missing plugin during a package restore.
Grasshopper2.Framework.Snippet
A pointer to a GHZ file containing a bunch of components acting as a snippet. The basic descriptive properties (Snippet.Nomen, Snippet.Icon) are read lazily from standalone chunks in the archive so the snippet can be drawn in the UI without deserialising the document graph. The document is only opened when a Snippet.Preview bitmap is requested.
Grasshopper2.Framework.SnippetServer
Maintains all loaded snippets.
Grasshopper2.Framework.TypeDescription