C# Class MvcContrib.Binders.DerivedTypeModelBinderCache

This cache is used to both improve performance of the derived type model binder on cases where a binding type has already been identified.
Datei anzeigen Open project: atomicobject/mvccontrib Class Usage Examples

Public Methods

Method Description
GetDerivedType ( string typeValue ) : Type
GetTypeName ( Type type ) : string

Gets a hashed name for the given type and also checks to see if the type has been registered.

RegisterDerivedTypes ( Type baseType, IEnumerable derivedTypes ) : bool

Registers the attached set of derived types by the indicated base type

Reset ( ) : void

removes all items from the cache

SetTypeStampSaltValue ( System.Guid guid ) : void

Private Methods

Method Description
EncryptStringToBase64 ( this value ) : string

Method Details

GetDerivedType() public static method

public static GetDerivedType ( string typeValue ) : Type
typeValue string
return System.Type

GetTypeName() public static method

Gets a hashed name for the given type and also checks to see if the type has been registered.
public static GetTypeName ( Type type ) : string
type System.Type The type.
return string

RegisterDerivedTypes() public static method

Registers the attached set of derived types by the indicated base type
public static RegisterDerivedTypes ( Type baseType, IEnumerable derivedTypes ) : bool
baseType System.Type base type that will be encountered by the binder where an alternate value should be used
derivedTypes IEnumerable an enumerable set of types to be considered for binding
return bool

Reset() public static method

removes all items from the cache
public static Reset ( ) : void
return void

SetTypeStampSaltValue() public static method

public static SetTypeStampSaltValue ( System.Guid guid ) : void
guid System.Guid
return void