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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valueboolThe 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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valuelongThe 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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valuefloatThe 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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valuestringThe 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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valueTPointerThe 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
TPointerThe 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
propertiesPropertiesThe group of properties where to property should be added
namestringThe name of the property to be added
valueTPointerThe value of the property to be added
cleanupAction<nint>The callback to call when the property is deleted, or
nullif no cleanup is necessary
Returns
- bool
true, if the property was successfully added to the group of properties; otherwise,false
Type Parameters
TPointerThe 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.