Provides neat little code-shortcuts for updating properties.
More...
|
static void | To< T > (this T value, ref T original, ref bool updated) |
| Updates a value and sets a boolean flag to true if the original value actually changed. More...
|
|
static void | To< T > (this T value, ref T original, ref bool updated1, ref bool updated2) |
| Updates a value and sets two boolean flags to true if the original value actually changed. More...
|
|
static void | To (this string value, ref string original, ref bool updated) |
| Updates a value and sets a boolean flag to true if the original value actually changed More...
|
|
static void | To (this string value, ref string original, ref bool updated1, ref bool updated2) |
| Updates a value and sets two boolean flags to true if the original value actually changed More...
|
|
static void | To< T > (this T value, ref T original, Action updated) |
| Updates a value and calls back a delegate if the original value actually changed. More...
|
|
static void | To (this string value, ref string original, Action updated) |
| Updates a value and calls back a delegate if the original value actually changed. More...
|
|
static void | Swap< T > (ref T value1, ref T value2) |
| Swaps the content of two fields. More...
|
|
Provides neat little code-shortcuts for updating properties.
◆ Swap< T >()
static void NanoByte.Common.UpdateUtils.Swap< T > |
( |
ref T |
value1, |
|
|
ref T |
value2 |
|
) |
| |
|
inlinestatic |
Swaps the content of two fields.
- Template Parameters
-
T | The type of objects to swap. |
- Parameters
-
value1 | The first field which will afterwards carry the content of value2 . |
value2 | The first field which will afterwards carry the content of value1 . |
◆ To() [1/3]
static void NanoByte.Common.UpdateUtils.To |
( |
this string |
value, |
|
|
ref string |
original, |
|
|
Action |
updated |
|
) |
| |
|
inlinestatic |
Updates a value and calls back a delegate if the original value actually changed.
- Parameters
-
value | The new value. |
original | The original value to update. |
updated | Gets called if value is different from original. |
◆ To() [2/3]
static void NanoByte.Common.UpdateUtils.To |
( |
this string |
value, |
|
|
ref string |
original, |
|
|
ref bool |
updated |
|
) |
| |
|
inlinestatic |
Updates a value and sets a boolean flag to true
if the original value actually changed
- Parameters
-
value | The new value |
original | The original value to update |
updated | Gets set to true if value is different from original |
◆ To() [3/3]
static void NanoByte.Common.UpdateUtils.To |
( |
this string |
value, |
|
|
ref string |
original, |
|
|
ref bool |
updated1, |
|
|
ref bool |
updated2 |
|
) |
| |
|
inlinestatic |
Updates a value and sets two boolean flags to true
if the original value actually changed
- Parameters
-
value | The new value |
original | The original value to update |
updated1 | Gets set to true if value is different from original |
updated2 | Gets set to true if value is different from original |
◆ To< T >() [1/3]
Updates a value and calls back a delegate if the original value actually changed.
- Template Parameters
-
T | The type of data to update. |
- Parameters
-
value | The new value. |
original | The original value to update. |
updated | Gets called if value is different from original. |
◆ To< T >() [2/3]
Updates a value and sets a boolean flag to true
if the original value actually changed.
- Template Parameters
-
T | The type of data to update. |
- Parameters
-
value | The new value. |
original | The original value to update. |
updated | Gets set to true if value is different from original. |
◆ To< T >() [3/3]
Updates a value and sets two boolean flags to true
if the original value actually changed.
- Template Parameters
-
T | The type of data to update. |
- Parameters
-
value | The new value. |
original | The original value to update. |
updated1 | Gets set to true if value is different from original. |
updated2 | Gets set to true if value is different from original. |
The documentation for this class was generated from the following file: