Clay is a C# library that implements a dynamic typing system similar to JavaScript using C# `dynamic` types.
Clay is an open source C# library that provides extensive dynamic type system support, far beyond what is possible using the built-in ExpandoObject
. The library provides a dynamic type factory class that can be used to create new dynamic types, which can then be extended in a manner similar to other dynamic languages such as JavaScript.
Clay-generated dynamic objects can have new properties defined for them dynamically, much like the ExpandoObject
type. In addition, Clay dynamic objects can:
- Add new properties using indexer syntax, allowing property names to be determined at run-time.
- Create dynamic arrays which are themselves extensible Clay objects
- Set properties using chained setters, in the style of jQuery, named arguments, or anonymous types
- Be treated as interface implementations if they have the correct set of properties.
Homepage: http://clay.codeplex.com/
Nu-Get : Install-Package Clay