Skip to content

About

Utilities for dealing with ExpandoObject.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Xpando

Utilities for dealing with ExpandoObject.

Converting an object

using XpandoLibrary;

var boringUser = new { Name ="John Smith" };
dynamic coolUser = boringUser.ToExpando(); // does the magic

coolUser.NickName = "Johny";

Checking if has any property

using XpandoLibrary;

var expando = new ExpandoObject();
dynamic dynamic = expando;

expando.Empty(); // True

dynamic.Foo = "Bar";

expando.Empty(); // False

Checking if has a specific property

using XpandoLibrary;

var expando = new ExpandoObject();
dynamic dynamic = expando;

dynamic.Foo = "Bar";

expando.HasProperty("Foo"); // True
expando.HasProperty("Qux"); // False

Removing a property

using XpandoLibrary;

var expando = new ExpandoObject();
dynamic dynamic = expando;

dynamic.Foo = "Bar";           // creates the property
expando.RemoveProperty("Foo"); // removes the property

Making a copy

using XpandoLibrary;

var expando = new ExpandoObject();

// (some initialization with nested ExpandoObject)

expando.ShallowCopy(); // creates a shallow copy of object (doesn't copy nested ExpandoObject)
expando.DeepCopy();    // creates a deep copy of object (copies nested ExpandoObject)

About

Utilities for dealing with ExpandoObject.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages