> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Method MoveStateFrom

Namespace: [Phoenix.ComponentAPI](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/2026-r1/apidocs/Phoenix.ComponentAPI)\
Assembly: Phoenix.ComponentAPI.dll

## MoveStateFrom(IEnumerable\<KeyValuePair\<string, VariableState>>, ComponentRunResultsMetadata)

Creates a new instance of a ComponentRunResults.

```csharp theme={null}
public static ComponentRunResults MoveStateFrom(IEnumerable<KeyValuePair<string, VariableState>> resultValues, ComponentRunResultsMetadata resultMetadata)

```

### Parameters

`resultValues` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[KeyValuePair](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2)\<[string](https://learn.microsoft.com/dotnet/api/system.string), VariableState>>

The output variable values to take ownership of. The source array should
not be used after calling this function.

`resultMetadata` [ComponentRunResultsMetadata](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/2026-r1/apidocs/Phoenix.ComponentAPI.ComponentRunResultsMetadata)

Metadata about each run

### Returns

[ComponentRunResults](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/2026-r1/apidocs/Phoenix.ComponentAPI.ComponentRunResults)

A new ComponentRunResults

### Remarks

You should always use the returned value in a using block, or otherwise ensure it will
be disposed.

## MoveStateFrom(VariableValueScope, ComponentRunResultsMetadata)

Creates a new instance of a ComponentRunResults by moving the data.

```csharp theme={null}
public static ComponentRunResults MoveStateFrom(VariableValueScope resultValues, ComponentRunResultsMetadata resultMetadata)

```

### Parameters

`resultValues` VariableValueScope

The output variable values to take ownership of. The source array should
not be used after calling this function.

`resultMetadata` [ComponentRunResultsMetadata](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/2026-r1/apidocs/Phoenix.ComponentAPI.ComponentRunResultsMetadata)

Metadata about each run

### Returns

[ComponentRunResults](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/2026-r1/apidocs/Phoenix.ComponentAPI.ComponentRunResults)

A new ComponentRunResults

### Remarks

You should always use the returned value in a using block, or otherwise ensure it will
be disposed.
