DotNetObjectReference<TValue> Class

Definition

Wraps a JS interop argument, indicating that the value should not be serialized as JSON but instead should be passed as a reference.

To avoid leaking memory, the reference must later be disposed by JS code or by .NET code.

generic <typename TValue>
 where TValue : classpublic ref class DotNetObjectReference sealed : IDisposable
public sealed class DotNetObjectReference<TValue> : IDisposable where TValue : class
type DotNetObjectReference<'Value (requires 'Value : null)> = class
    interface IDisposable
Public NotInheritable Class DotNetObjectReference(Of TValue)
Implements IDisposable

Type Parameters

TValue

The type of the value to wrap.

Inheritance
DotNetObjectReference<TValue>
Implements

Properties

Value

Gets the object instance represented by this wrapper.

Methods

Dispose()

Stops tracking this object reference, allowing it to be garbage collected (if there are no other references to it). Once the instance is disposed, it can no longer be used in interop calls from JavaScript code.

Applies to