CimSerializer.Serialize Method (CimClass, ClassSerializationOptions, Byte[], UInt32)

 

Serializes a CIM class and reports whether the serialized data fits into the specified buffer.

Namespace:   Microsoft.Management.Infrastructure.Serialization
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Syntax

public bool Serialize(
    CimClass cimClass,
    ClassSerializationOptions options,
    byte[] buffer,
    ref uint offset
)
public:
bool Serialize(
    CimClass^ cimClass,
    ClassSerializationOptions options,
    array<unsigned char>^ buffer,
    unsigned int% offset
)
member Serialize : 
        cimClass:CimClass *
        options:ClassSerializationOptions *
        buffer:byte[] *
        offset:uint32 byref -> bool
Public Function Serialize (
    cimClass As CimClass,
    options As ClassSerializationOptions,
    buffer As Byte(),
    ByRef offset As UInteger
) As Boolean

Parameters

  • buffer
    Type: System.Byte[]

    The buffer that stores the returned serialized data. This value can be set to null if the method is called only to read back the required buffer length from the offset parameter.

  • offset
    Type: System.UInt32

    The offset in the buffer where the data is written. After the method returns, the offset is increased by the amount of data taken by the serialized representation of the CIM class.

Return Value

Type: System.Boolean

true if the serialized data fit into the buffer; otherwise, false.

See Also

Serialize Overload
CimSerializer Class
Microsoft.Management.Infrastructure.Serialization Namespace

Return to top