Table of Contents

Class FunctionReference

Namespace
CounterStrikeSharp.API.Core
Assembly
CounterStrikeSharp.API.dll

Represents a reference to a function that can be called from native code.

public class FunctionReference
Inheritance
FunctionReference

Properties

CompletionTask

For SingleUse function references, this task will complete when the function has finished invoking.

public Task CompletionTask { get; }

Property Value

Task

Identifier

public int Identifier { get; }

Property Value

int

Lifetime

Describes the lifetime of a function reference.

public FunctionLifetime Lifetime { get; }

Property Value

FunctionLifetime

Methods

Create(Delegate, FunctionLifetime)

public static FunctionReference Create(Delegate method, FunctionLifetime lifetime = FunctionLifetime.Permanent)

Parameters

method Delegate
lifetime FunctionLifetime

Returns

FunctionReference

GetFunctionPointer()

public nint GetFunctionPointer()

Returns

nint

Remove(int)

public static void Remove(int reference)

Parameters

reference int