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
파일 보기 프로젝트 열기: ngallagher/simplexml 1 사용 예제들

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