Show / Hide Table of Contents

# Class DisposableNamedOnnxValue

This class serves as a container for model run output values including tensors, sequences of tensors, sequences and maps. It extends NamedOnnxValue, exposes the OnnxValueType and Tensor type The class must be disposed of. It disposes of _ortValueHolder that owns the underlying Ort output value and anything else that would need to be disposed by the instance of the class. Use factory method CreateFromOrtValue to obtain an instance of the class.

##### Inheritance

System.Object
NamedOnnxValue
DisposableNamedOnnxValue

##### Implements

IDisposable

##### Inherited Members

NamedOnnxValue._value
NamedOnnxValue._name
NamedOnnxValue.CreateFromTensor<T>(String, Tensor<T>)
NamedOnnxValue.Name
NamedOnnxValue.Value
NamedOnnxValue.AsTensor<T>()
NamedOnnxValue.AsEnumerable<T>()
NamedOnnxValue.AsDictionary<K, V>()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Microsoft.ML.OnnxRuntime

###### Assembly: cs.temp.dll.dll

##### Syntax

    public class DisposableNamedOnnxValue : NamedOnnxValue

### Properties

#### ElementType

Only valid if ValueType is Tensor

##### Declaration

    public TensorElementType ElementType { get; }

##### Property Value

Type | Description
--- | ---
TensorElementType |

#### ValueType

Returns OnnxValueType

##### Declaration

    public OnnxValueType ValueType { get; }

##### Property Value

Type | Description
--- | ---
OnnxValueType |

### Methods

#### Dispose()

IDisposable implementation

##### Declaration

    public void Dispose()

#### Dispose(Boolean)

IDisposable implementation

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing | true if invoked by Dispose()

### Implements

IDisposable