.NET Client Documentation
5.3.0
Search Results for

    Show / Hide Table of Contents

    SetGenericRecord Method

    SetGenericRecord(string, IGenericRecord?)

    Adds a IGenericRecord object field to the record.

    Declaration
    IGenericRecordBuilder SetGenericRecord(string fieldname, IGenericRecord? value)
    Parameters
    string fieldname

    The name of the field.

    IGenericRecord value

    The value of the field.

    Returns
    IGenericRecordBuilder

    This IGenericRecordBuilder.

    Remarks

    It is only legal to set a generic record object produced by the same type of builder. For instance, a compact generic record can only accept a compact generic record. Trying to set a different kind of generic record results in a exception.

    It is legal to set the field again only when the builder is created with NewBuilderWithClone(); it is otherwise illegal to set to the same field twice.

    This method allows nested structures; subclasses should also be created as IGenericRecord of the same nature of the nesting one. I.e. compact records can only nest compact records.

    Exceptions
    SerializationException

    The build has been initialized with a schema, and fieldname is not the name of field of that schema, or the type of the field does not match the specified value, or the field value is set multiple times.

    In This Article
    Back to top Copyright © 2010-2023 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.