EvaluationSeriesContext

public class EvaluationSeriesContext

Contextual information that will be provided to handlers during evaluation series.

  • The key of the flag being evaluated.

    Declaration

    Swift

    public let flagKey: String
  • The context in effect at the time of evaluation.

    Declaration

    Swift

    public let context: LDContext
  • The default value provided to the calling evaluation method.

    Declaration

    Swift

    public let defaultValue: LDValue
  • A string identifing the name of the method called.

    Declaration

    Swift

    public let methodName: String
  • The key identifying the result this evaluation will return, for a hook that decides what to do with an evaluation by whether it has seen the same result before. DedupingHook is such a hook.

    This property is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is experimental.

    This describes the flag rather than the evaluation result because a deduping hook decides before the series opens: hooks pair their stages, so a hook that opens a span in beforeEvaluation and closes it in afterEvaluation would be left holding an open span were only the after stage suppressed. It is the evaluation’s own read of the flag, the one its result is derived from, so it identifies the result either stage is about to see, and every hook that asks is told about that same result.

    See EvaluationExposureKey for what makes two evaluations the same exposure.

    This is nil when the context was not built by the SDK, and so has no result to describe.

    Declaration

    Swift

    public var evaluationExposureKey: EvaluationExposureKey? { get }