Header menu logo Mibo

ComponentRef<'T> Type

Mutable handle for a MonoGame component instance created during game initialization.

This is intended to be allocated in the composition root (per game instance) and then threaded into Elmish update/subscribe functions, avoiding global/module-level mutable state.

Constructors

Constructor Description

ComponentRef()

Full Usage: ComponentRef()

Returns: ComponentRef<'T>
Returns: ComponentRef<'T>

Instance members

Instance member Description

this.Clear

Full Usage: this.Clear

Clears the component reference.

this.Set

Full Usage: this.Set

Parameters:
    v : 'T

Sets the component reference. Called automatically by Program.withComponentRef.

v : 'T

this.TryGet

Full Usage: this.TryGet

Returns: 'T voption

Attempts to get the component, returning ValueNone if not yet initialized.

Returns: 'T voption

Type something to start searching.