Share via


ItemMetadata.SetCustomField Method (String, array<Byte )

When overridden in a derived class, sets the value of the specified custom field.

Namespace:  Microsoft.Synchronization.MetadataStorage
Assembly:  Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)

Syntax

'Declaration
Public MustOverride Sub SetCustomField ( _
    fieldName As String, _
    value As Byte() _
)
'Usage
Dim instance As ItemMetadata
Dim fieldName As String
Dim value As Byte()

instance.SetCustomField(fieldName, value)
public abstract void SetCustomField(
    string fieldName,
    byte[] value
)
public:
virtual void SetCustomField(
    String^ fieldName, 
    array<unsigned char>^ value
) abstract
abstract SetCustomField : 
        fieldName:string * 
        value:byte[] -> unit 
public abstract function SetCustomField(
    fieldName : String, 
    value : byte[]
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

fieldName is a null reference (Nothing in Visual Basic).

ArgumentException

fieldName is 0 length.

ArgumentOutOfRangeException

value is too long. For the implementation of this class that is available by using SqlMetadataStore, values must be less than 8000 bytes.

Remarks

Custom fields must be defined in a FieldSchema object when the replica metadata is first initialized.

See Also

Reference

ItemMetadata Class

SetCustomField Overload

Microsoft.Synchronization.MetadataStorage Namespace