unmarshalForCodec static method

void unmarshalForCodec(
  1. bool structCodec,
  2. List<int> data,
  3. Unmarshaler msg
)

Decode data into msg with the codec selected for a call.

Implementation

static void unmarshalForCodec(bool structCodec, List<int> data, Unmarshaler msg) {
  if (structCodec) {
    if (msg is StructUnmarshaler) {
      (msg as StructUnmarshaler).unmarshalStruct(data);
      return;
    }
    throw StatusException(Wire.codeInternal, 'message has no struct codec');
  }
  msg.unmarshalDc(data);
}