Table of Contents

Class InfoReader

Namespace
CADability
Assembly
CADability.dll

Encapsulates the SerializationInfo.GetInfo function

public class InfoReader
Inheritance
InfoReader
Inherited Members

Constructors

InfoReader()

public InfoReader()

Methods

Read(SerializationInfo, string, Type)

Reads the requested object. Returns null if the object cannot be read. Calls info.GetValue(key,type).

public static object Read(SerializationInfo info, string key, Type type)

Parameters

info SerializationInfo

the SerializationInfo object

key string

the name of the object

type Type

the type of the requested object

Returns

object

the object or null

ReadBool(object)

public static bool ReadBool(object val)

Parameters

val object

Returns

bool

ReadOrCreate(SerializationInfo, string, Type, params object[])

Reads or creates the requested object. Calls info.GetValue(key,type). If the object cannot be read, this method tries to invoke a constructor for the object with the given parameters. If the constructor invokation fails null will be returned.

public static object ReadOrCreate(SerializationInfo info, string key, Type type, params object[] args)

Parameters

info SerializationInfo

the SerializationInfo object

key string

the name of the object

type Type

the type of the requested object

args object[]

parameters for the constructor

Returns

object

the read or created object