Skip to content

[v2.2] [Chore] Casting for IsContextPersistent Cleanup #80

@DamianSuess

Description

@DamianSuess

Description

Update the Context cleanup RunAnyStateRecursiveAsync(..) to use object instead of the previous string. Though it is functional, this helps maintain compatibility with the keys.

foreach (string k in parameters.Keys) --> foreach (object k in parameters.Keys)

Code Block:

    // Optionally cleanup context added by the children; giving the parent a peek at their mess.
    if (!IsContextPersistent)
    {
      if (parameters is not null)
      {
        foreach (string k in parameters.Keys)
          if (!originalParamKeys.Contains(k)) parameters.Remove(k);
      }

      if (errors is not null)
      {
        foreach (string k in errors.Keys)
          if (!originalErrorKeys.Contains(k)) errors.Remove(k);
      }
    }

Context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions