Share via


ModelReaderWriterTypeBuilder.GetItems(Object) Method

Definition

Gets an IEnumerable representation of the passed in collection.

protected virtual System.Collections.IEnumerable? GetItems(object collection);
abstract member GetItems : obj -> System.Collections.IEnumerable
override this.GetItems : obj -> System.Collections.IEnumerable
Protected Overridable Function GetItems (collection As Object) As IEnumerable

Parameters

collection
Object

Returns

An IEnumerable representation if its a collection otherwise null.

Remarks

This is only needed when the collection passed into Write(Object, ModelReaderWriterOptions, ModelReaderWriterContext) does not implement IEnumerable. In this case you must implement this method to return an IEnumerable.

Applies to