C# Class OpenStory.Common.AtomicBoolean

Represents a thread-safe Boolean value.
Exibir arquivo Open project: shoftee/OpenStory Class Usage Examples

Public Methods

Method Description
AtomicBoolean ( bool initialValue ) : System

Initializes a new instance of the AtomicBoolean class.

FlipIf ( bool comparand ) : bool

Flips the value of the AtomicBoolean if it is equal to the specified boolean value.

Set ( bool newValue ) : void

Sets the value of the AtomicBoolean to the provided value.

ToBoolean ( ) : bool

Extracts a Boolean from an AtomicBoolean instance.

ToBoolean ( AtomicBoolean atomicBoolean ) : bool

Extracts a Boolean from an instance of AtomicBoolean.

Method Details

AtomicBoolean() public method

Initializes a new instance of the AtomicBoolean class.
public AtomicBoolean ( bool initialValue ) : System
initialValue bool The initial value.
return System

FlipIf() public method

Flips the value of the AtomicBoolean if it is equal to the specified boolean value.
public FlipIf ( bool comparand ) : bool
comparand bool The value to compare with.
return bool

Set() public method

Sets the value of the AtomicBoolean to the provided value.
public Set ( bool newValue ) : void
newValue bool The new value to assign.
return void

ToBoolean() public method

Extracts a Boolean from an AtomicBoolean instance.
public ToBoolean ( ) : bool
return bool

ToBoolean() public static method

Extracts a Boolean from an instance of AtomicBoolean.
/// Thrown if is . ///
public static ToBoolean ( AtomicBoolean atomicBoolean ) : bool
atomicBoolean AtomicBoolean The to extract the value of.
return bool