Enum EmulatorDetection (4.0.0)

Stay organized with collections Save and categorize content based on your preferences.
public enum EmulatorDetection

Specifies whether or not an emulator configuration should be present and whether or not it should be used. Emulator configuration is usually specified through environment variables.

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Fields

NameDescription
EmulatorOnly

Always connect to the emulator, throwing an exception if no emulator configuration is detected.

EmulatorOrProduction

Connect to the emulator if an emulator configuration is detected, or production otherwise. This is a convenient option, but risks damage to production databases or running up unexpected bills if tests are accidentally run in production due to the emulator configuration being absent unexpectedly. (Using separate projects for production and testing is a best practice for preventing the first issue, but may be unrealistic for small or hobby projects.)

None

Ignores the presence or absence of emulator configuration.

ProductionOnly

Always connect to the production servers, but throw an exception if an emulator configuration is detected that would suggest connecting to an emulator is expected.