Created
March 13, 2010 02:08
-
-
Save atheken/331041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//example expando... | |
public class ExtensibleClass : IFlyweight | |
{ | |
private Dictionary<string, object> _props = new Dictionary<String, object>(); | |
public object this[String key]{ | |
get{ | |
return this._props[key]; | |
} | |
set | |
{ | |
this._props[key]; | |
} | |
} | |
public IEnumerable<ExpandoProperty> AllProperties(){ | |
return this._props.Select(y=>new ExpandoProperty(y.Key, y.Value)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment