Skip to content

[C#] - Invalid generated code for string field. #955

Closed
@leandrogomes777

Description

@leandrogomes777

Hi guys,

I'm using the SbeTools (I've tried the one in the nuget package and with the latest version here in git), but the generated code is invalid with the template i'm running. The DirectBuffer class don't have the signature method for the generated code (Uint8Put).

The code generated below:

public void SetDeskID(string value)
{
    var encoding = DeskIDResolvedCharacterEncoding;
    const int sizeOfLengthField = 1;
    int limit = _parentMessage.Limit;
    int byteCount = _buffer.SetBytesFromString(encoding, value, limit + sizeOfLengthField);
    _parentMessage.Limit = limit + sizeOfLengthField + byteCount;
    _buffer.Uint8Put(limit, (ushort)byteCount);
}

The DirectBuffer code:

public unsafe void Uint8Put(int index, byte value)
{
    _pBuffer[index] = value;
}

Could you guys check?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions