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

The ConversionInstance object is used to promote the type to some more specialized type. For example if a field or method that represents a List is annotated then this might create a specialized type such as a Vector. It typically used to promote a type either because it is abstract or because another type is required.

This is used by the CollectionFactory to convert the type of a collection field from an abstract type to a instantiable type. This is used to simplify strategy implementations.

Наследование: Instance
Показать файл Открыть проект

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

Метод Описание
ConversionInstance ( Context context, Value value, Class convert ) : SimpleFramework.Xml.Strategy

This is used to specify the creation of a conversion type that can be used for creating an instance with a class other than the default class specified by the Value object.

GetInstance ( Class type ) : Object
IsReference ( ) : bool
SetInstance ( Object Object ) : Object

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.

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

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

This is used to specify the creation of a conversion type that can be used for creating an instance with a class other than the default class specified by the Value object.
public ConversionInstance ( Context context, Value value, Class convert ) : SimpleFramework.Xml.Strategy
context Context /// this is the context used for instantiation ///
value Value /// this is the type used to create the instance ///
convert Class /// this is the class the type is converted to ///
Результат SimpleFramework.Xml.Strategy

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

public GetInstance ( Class type ) : Object
type Class /// this is the type of the instance to create ///
Результат Object

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

public IsReference ( ) : bool
Результат bool

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

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.
public SetInstance ( Object Object ) : Object
Object Object
Результат Object