Game.Simulation.GarbageCollectionRequestFlags
Assembly:
Game
Namespace: Game.Simulation
Type:
enum
Base:
System.Byte
Summary:
A bitflags enumeration (marked with [Flags]) used by the simulation to indicate one or more categories of garbage collection requests. The enum uses an underlying type of byte (8 bits). Only a single flag is defined in this file: IndustrialWaste. A value of 0 (not explicitly defined in the enum) represents "no flags" set.
Fields
IndustrialWaste = 1
Flag indicating a garbage collection request related to industrial waste. Because the enum is decorated with [Flags], this value can be combined with other flags (if added in the future) using bitwise operations.
Properties
- This enum defines no properties.
Constructors
- Enums do not define explicit constructors in source; the CLR provides implicit behavior. There are no public constructors defined for this enum.
Methods
- This enum defines no methods.
Usage Example
// Set a flag (only one flag exists currently)
GarbageCollectionRequestFlags request = GarbageCollectionRequestFlags.IndustrialWaste;
// Check whether the IndustrialWaste flag is set
if ((request & GarbageCollectionRequestFlags.IndustrialWaste) == GarbageCollectionRequestFlags.IndustrialWaste)
{
// handle industrial waste garbage collection request
}
// Combine flags (example for future flags)
// GarbageCollectionRequestFlags combined = GarbageCollectionRequestFlags.IndustrialWaste | GarbageCollectionRequestFlags.AnotherFlag;
// Note: underlying type is byte. A value of 0 means "no flags" (none set).