Class InterlockedExtensions

Defines some additions to the System.Threading.Interlocked class

Inheritance
System.Object
InterlockedExtensions
Namespace: Solti.Utils.Primitives.Threading
Assembly: Solti.Utils.Primitives.dll
Syntax
public static class InterlockedExtensions : Object

Methods

DecrementIfGreaterThan(ref Int32, Int32)

Decrements the first value if it is greater than the second one.

Declaration
public static Nullable<int> DecrementIfGreaterThan(ref int location, int comparand)
Parameters
Type Name Description
System.Int32 location
System.Int32 comparand
Returns
Type Description
System.Nullable<System.Int32>

IncrementIfGreaterThan(ref Int32, Int32)

Increments the first value if it is greater than the second one.

Declaration
public static Nullable<int> IncrementIfGreaterThan(ref int location, int comparand)
Parameters
Type Name Description
System.Int32 location
System.Int32 comparand
Returns
Type Description
System.Nullable<System.Int32>

IncrementIfLessThan(ref Int32, Int32)

Increments the first value if it is less than the second one.

Declaration
public static Nullable<int> IncrementIfLessThan(ref int location, int comparand)
Parameters
Type Name Description
System.Int32 location
System.Int32 comparand
Returns
Type Description
System.Nullable<System.Int32>

Max(ref Int32, Int32)

Compares two integers and replaces the first value with the second one if the second value is bigger.

Declaration
public static int Max(ref int location, int comparand)
Parameters
Type Name Description
System.Int32 location
System.Int32 comparand
Returns
Type Description
System.Int32

Or(ref Int32, Int32)

Bitwise "ors" two integers and replaces the first value with the result.

Declaration
public static int Or(ref int location, int value)
Parameters
Type Name Description
System.Int32 location
System.Int32 value
Returns
Type Description
System.Int32
In This Article
Back to top Generated by DocFX