C# Class Rabbit.DynamicExtensions

Summary description for Extensions
Show file Open project: yysun/Rabbit

Public Methods

Method Description
EnsureProperty ( this obj, string propertyName, object propertyValue ) : void
HasProperty ( this obj, string propertyName, object propertyValue = null ) : bool
ToDynamic ( this record ) : dynamic
ToDynamic ( object>.this dictionary ) : dynamic

http://coderjournal.com/2010/07/turning-json-into-a-expandoobject/

ToJson ( this expando ) : string

Method Details

EnsureProperty() public static method

public static EnsureProperty ( this obj, string propertyName, object propertyValue ) : void
obj this
propertyName string
propertyValue object
return void

HasProperty() public static method

public static HasProperty ( this obj, string propertyName, object propertyValue = null ) : bool
obj this
propertyName string
propertyValue object
return bool

ToDynamic() public static method

public static ToDynamic ( this record ) : dynamic
record this
return dynamic

ToDynamic() public static method

http://coderjournal.com/2010/07/turning-json-into-a-expandoobject/
public static ToDynamic ( object>.this dictionary ) : dynamic
dictionary object>.this
return dynamic

ToJson() public static method

public static ToJson ( this expando ) : string
expando this
return string