Class InputData
public sealed class InputData : LiteRTLMNativeHandle
- Inheritance
-
objectInputData
- 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
datastringThe text data.
Exceptions
- ArgumentException
Thrown if
datais 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
dataTypeInputDataTypeThe type of the input data.
nativeDatanintThe data buffer. The data is copied internally.
sizenuintThe size of the data in bytes.
Exceptions
- ArgumentException
Thrown if
nativeDataorsizeis 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
dataTypeInputDataTypeThe type of the input data.
dataReadOnlySpan<byte>The data buffer.
Exceptions
- ArgumentException
Thrown if
datais empty.- InvalidOperationException
Thrown if the native object could not be created.
Methods
ReleaseUnmanagedResources()
protected override void ReleaseUnmanagedResources()