C# Класс SimpleFramework.Xml.Core.ArrayFactory

The ArrayFactory is used to create object array types that are compatible with the field type. This simply requires the type of the array in order to instantiate that array. However, this also performs a check on the field type to ensure that the array component types are compatible.
Наследование: Factory
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
ArrayFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy

Constructor for the ArrayFactory object. This is given the array component type as taken from the field type of the source object. Each request for an array will return an array which uses a compatible component type.

GetInstance ( InputNode node ) : Instance
GetInstance ( Value value, Class type ) : Instance

Creates the array type to use. This will use the provided XML element to determine the array type and provide a means for creating an array with the Value object. If the array types are not compatible an exception is thrown.

Описание методов

ArrayFactory() публичный Метод

Constructor for the ArrayFactory object. This is given the array component type as taken from the field type of the source object. Each request for an array will return an array which uses a compatible component type.
public ArrayFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy
context Context /// this is the context object for serialization ///
type System.Type /// the array component type for the field object ///
Результат SimpleFramework.Xml.Strategy

GetInstance() публичный Метод

public GetInstance ( InputNode node ) : Instance
node InputNode /// this is the input node for the array element ///
Результат Instance

GetInstance() публичный Метод

Creates the array type to use. This will use the provided XML element to determine the array type and provide a means for creating an array with the Value object. If the array types are not compatible an exception is thrown.
public GetInstance ( Value value, Class type ) : Instance
value Value /// this is the type object with the array details ///
type Class /// this is the entry type for the array instance ///
Результат Instance