Table of Contents

Class ConfigResolution

Namespace
Virtufin.Worker.DevKit
Assembly
Virtufin.Worker.DevKit.dll

Resolves per-instance worker config from CloudEvent extension attributes -- never from the payload. WorkManager stamps a worker's creation-time config onto every triggering event as extension attributes, so config always arrives this way; same-named payload fields belong to the event's own domain schema and are ignored.

public static class ConfigResolution
Inheritance
ConfigResolution
Inherited Members

Remarks

The one shared copy. Virtufin.Strategy.DevKit.ConfigResolution and Virtufin.Indicator.DevKit.ConfigResolution forward here.

Methods

ResolveGuid(CloudEvent, string, Guid)

A GUID config value, or instanceDefault when unset or unparsable.

public static Guid ResolveGuid(CloudEvent input, string key, Guid instanceDefault)

Parameters

input CloudEvent
key string
instanceDefault Guid

Returns

Guid

ResolvePositiveInt(CloudEvent, string, int)

A positive integer config value, or fallback when unset.

public static int ResolvePositiveInt(CloudEvent input, string key, int fallback)

Parameters

input CloudEvent
key string
fallback int

Returns

int

Exceptions

InvalidOperationException

Set but not a positive integer.

ResolveRequiredString(CloudEvent, string)

A required string config value.

public static string ResolveRequiredString(CloudEvent input, string key)

Parameters

input CloudEvent
key string

Returns

string

Exceptions

InvalidOperationException

Unset or blank; the message names key.

ResolveString(CloudEvent, string, string)

A string config value, or fallback when unset or blank.

public static string ResolveString(CloudEvent input, string key, string fallback)

Parameters

input CloudEvent
key string
fallback string

Returns

string