Table of Contents

Class PropertiesExtensions

Namespace
Sdl3Sharp
Assembly
Sdl3Sharp.dll

Provides extensions for Properties

public static class PropertiesExtensions
Inheritance
PropertiesExtensions
Inherited Members

Methods

Add(Properties, string, bool)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there

public static bool Add(this Properties properties, string name, bool value)

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value bool

The value of the property to be added

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.

Add(Properties, string, long)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there

public static bool Add(this Properties properties, string name, long value)

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value long

The value of the property to be added

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.

Add(Properties, string, float)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there

public static bool Add(this Properties properties, string name, float value)

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value float

The value of the property to be added

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.

Add(Properties, string, string?)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there

public static bool Add(this Properties properties, string name, string? value)

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value string

The value of the property to be added

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.

Add<TPointer>(Properties, string, TPointer)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there

public static bool Add<TPointer>(this Properties properties, string name, TPointer value) where TPointer : struct, IBinaryInteger<nint>

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value TPointer

The value of the property to be added

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Type Parameters

TPointer

The type of pointer value to be used as the value of the property. This has to be nint.

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.

Add<TPointer>(Properties, string, TPointer, Action<nint>?)

Adds a propery with a specified name to a group of properties, when the property doesn't yet exist there. This sets the pointer value of the property together with a cleanup callback that is called when the property is deleted.

public static bool Add<TPointer>(this Properties properties, string name, TPointer value, Action<nint>? cleanup) where TPointer : struct, IBinaryInteger<nint>

Parameters

properties Properties

The group of properties where to property should be added

name string

The name of the property to be added

value TPointer

The value of the property to be added

cleanup Action<nint>

The callback to call when the property is deleted, or null if no cleanup is necessary

Returns

bool

true, if the property was successfully added to the group of properties; otherwise, false

Type Parameters

TPointer

The type of pointer value to be used as the value of the property. This has to be nint.

Remarks

You shouldn't necessarily call this method directly from user code. It primarily exists to allow Properties to be used with collection initialization.