C# Class FluentLinqToSql.ActiveRecord.NameValueDeserializer

显示文件 Open project: JeremySkinner/FluentLinqToSql Class Usage Examples

Public Methods

Method Description
Deserialize ( NameValueCollection collection, string prefix, Type targetType ) : object

Deserializes the specified request collection.

Deserialize ( NameValueCollection collection, string prefix, Type targetType, object instance ) : void

Protected Methods

Method Description
CheckPrefixInRequest ( NameValueCollection collection, string prefix ) : bool
CreateGenericListInstance ( Type targetType ) : IList
CreateInstance ( Type targetType ) : object
DeserializeArrayList ( NameValueCollection collection, string prefix, Type elementType ) : ArrayList
DeserializeGenericList ( NameValueCollection collection, string prefix, Type targetType, IList &instance ) : void
GetArrayPrefixes ( NameValueCollection collection, string prefix ) : string[]
GetComplexProperty ( object instance, PropertyInfo property ) : object
GetGenericListProperty ( object instance, PropertyInfo property ) : IList
GetProperties ( Type targetType ) : System.Reflection.PropertyInfo[]
IsGenericList ( Type instanceType ) : bool
IsSimpleProperty ( Type propertyType ) : bool
SetValue ( object instance, PropertyInfo property, IConvertible oValue ) : bool
SetValue ( object instance, PropertyInfo property, object value ) : bool

Private Methods

Method Description
GetConvertible ( string sValue ) : IConvertible

Method Details

CheckPrefixInRequest() protected method

protected CheckPrefixInRequest ( NameValueCollection collection, string prefix ) : bool
collection System.Collections.Specialized.NameValueCollection
prefix string
return bool

CreateGenericListInstance() protected method

protected CreateGenericListInstance ( Type targetType ) : IList
targetType System.Type
return IList

CreateInstance() protected method

protected CreateInstance ( Type targetType ) : object
targetType System.Type
return object

Deserialize() public method

Deserializes the specified request collection.
public Deserialize ( NameValueCollection collection, string prefix, Type targetType ) : object
collection System.Collections.Specialized.NameValueCollection The collection.
prefix string The prefix.
targetType System.Type Type of the target.
return object

Deserialize() public method

public Deserialize ( NameValueCollection collection, string prefix, Type targetType, object instance ) : void
collection System.Collections.Specialized.NameValueCollection
prefix string
targetType System.Type
instance object
return void

DeserializeArrayList() protected method

protected DeserializeArrayList ( NameValueCollection collection, string prefix, Type elementType ) : ArrayList
collection System.Collections.Specialized.NameValueCollection
prefix string
elementType System.Type
return System.Collections.ArrayList

DeserializeGenericList() protected method

protected DeserializeGenericList ( NameValueCollection collection, string prefix, Type targetType, IList &instance ) : void
collection System.Collections.Specialized.NameValueCollection
prefix string
targetType System.Type
instance IList
return void

GetArrayPrefixes() protected method

protected GetArrayPrefixes ( NameValueCollection collection, string prefix ) : string[]
collection System.Collections.Specialized.NameValueCollection
prefix string
return string[]

GetComplexProperty() protected method

protected GetComplexProperty ( object instance, PropertyInfo property ) : object
instance object
property System.Reflection.PropertyInfo
return object

GetGenericListProperty() protected method

protected GetGenericListProperty ( object instance, PropertyInfo property ) : IList
instance object
property System.Reflection.PropertyInfo
return IList

GetProperties() protected static method

protected static GetProperties ( Type targetType ) : System.Reflection.PropertyInfo[]
targetType System.Type
return System.Reflection.PropertyInfo[]

IsGenericList() protected method

protected IsGenericList ( Type instanceType ) : bool
instanceType System.Type
return bool

IsSimpleProperty() protected method

protected IsSimpleProperty ( Type propertyType ) : bool
propertyType System.Type
return bool

SetValue() protected method

protected SetValue ( object instance, PropertyInfo property, IConvertible oValue ) : bool
instance object
property System.Reflection.PropertyInfo
oValue IConvertible
return bool

SetValue() protected method

protected SetValue ( object instance, PropertyInfo property, object value ) : bool
instance object
property System.Reflection.PropertyInfo
value object
return bool