Table of Contents

Class InputData

public sealed class InputData : LiteRTLMNativeHandle
Inheritance
object
InputData
Inherited Members

Constructors

InputData(string)

Creates a managed wrapper around text input data. The caller is responsible for disposing the wrapper using Dispose().

public InputData(string data)

Parameters

data string

The text data.

Exceptions

ArgumentException

Thrown if data is null or empty.

InvalidOperationException

Thrown if the native object could not be created.

InputData(InputDataType, nint, nuint)

Creates a managed wrapper around LiteRT LM input data. The caller is responsible for disposing the wrapper using Dispose().

public InputData(InputDataType dataType, nint nativeData, nuint size)

Parameters

dataType InputDataType

The type of the input data.

nativeData nint

The data buffer. The data is copied internally.

size nuint

The size of the data in bytes.

Exceptions

ArgumentException

Thrown if nativeData or size is invalid.

InvalidOperationException

Thrown if the native object could not be created.

InputData(InputDataType, ReadOnlySpan<byte>)

Creates a managed wrapper around binary input data. The caller is responsible for disposing the wrapper using Dispose().

public InputData(InputDataType dataType, ReadOnlySpan<byte> data)

Parameters

dataType InputDataType

The type of the input data.

data ReadOnlySpan<byte>

The data buffer.

Exceptions

ArgumentException

Thrown if data is empty.

InvalidOperationException

Thrown if the native object could not be created.

Methods

ReleaseUnmanagedResources()

protected override void ReleaseUnmanagedResources()