次の方法で共有


ModelReaderWriter.Write Method

Definition

Overloads

Write(Object, ModelReaderWriterOptions)

Converts the value of a model into a BinaryData.

Write<T>(T, ModelReaderWriterOptions)

Converts the value of a model into a BinaryData.

Write(Object, ModelReaderWriterOptions)

Source:
ModelReaderWriter.cs
Source:
ModelReaderWriter.cs

Converts the value of a model into a BinaryData.

public static BinaryData Write (object model, System.ClientModel.Primitives.ModelReaderWriterOptions? options = default);
static member Write : obj * System.ClientModel.Primitives.ModelReaderWriterOptions -> BinaryData
Public Shared Function Write (model As Object, Optional options As ModelReaderWriterOptions = Nothing) As BinaryData

Parameters

model
Object

The model to convert.

Returns

A BinaryData representation of the model in the Format specified by the options.

Exceptions

Throws if model does not implement IPersistableModel<T>.

If the model does not support the requested Format.

If model is null.

Applies to

Write<T>(T, ModelReaderWriterOptions)

Source:
ModelReaderWriter.cs
Source:
ModelReaderWriter.cs

Converts the value of a model into a BinaryData.

public static BinaryData Write<T> (T model, System.ClientModel.Primitives.ModelReaderWriterOptions? options = default) where T : System.ClientModel.Primitives.IPersistableModel<T>;
static member Write : 'T * System.ClientModel.Primitives.ModelReaderWriterOptions -> BinaryData (requires 'T :> System.ClientModel.Primitives.IPersistableModel<'T>)
Public Shared Function Write(Of T As IPersistableModel(Of T)) (model As T, Optional options As ModelReaderWriterOptions = Nothing) As BinaryData

Type Parameters

T

The type of the value to write.

Parameters

model
T

The model to convert.

Returns

A BinaryData representation of the model in the Format specified by the options.

Exceptions

If the model does not support the requested Format.

If model is null.

Applies to