Questions tagged [idynamicobject]

7 questions
6
votes
5 answers

How do you implement C#4's IDynamicObject interface?

To implement "method-missing"-semantics and such in C# 4.0, you have to implement IDynamicObject: public interface IDynamicObject { MetaObject GetMetaObject(Expression parameter); } As far as I can figure out IDynamicObject is actually part of…
Rasmus Faber
  • 48,631
  • 24
  • 141
  • 189
5
votes
3 answers

Can I implement method_missing in C# 4 and have it actually return a value?

I was trying to figure out how to implement method_missing in C# 4, based on all of 2 blog posts floating around on IDynamicObject. What I want to do is have a Business Logic Layer that has a Repository, and if the method is missing from the…
1
vote
2 answers

DLR & Performance

I'm intending to create a web service which performs a large number of manually-specified calculations as fast as possible, and have been exploring the use of DLR. Sorry if this is long but feel free to skim over and get the general gist. I've been…
1
vote
2 answers

IDynamicObject could not be found?

When trying to run the sample code here: http://www.nikhilk.net/Live-Search-REST-API.aspx I get: Error 52 The type or namespace name 'IDynamicObject' could not be found (are you missing a using directive or an assembly reference?) …
user156888
1
vote
1 answer

Dynamic Auto updating (to UI, Grid) binding list in C# Winform?

I'm not even sure if I'm doing this correctly. But basically I have a list of objects that are built out of a class/interface. From there, I am binding the list to a DataGridView that is on a Windows Form (C#) Here the list is a Sync list which will…
Dhanapal
  • 14,239
  • 35
  • 115
  • 142
0
votes
1 answer

IDynamicObject implementation ignores multiple property invocations

I've implemented IDynamicObject in C# 4, return a custom MetaObject subclass that does simple property getter/setter dispatch to a Dictionary. Not rocket science. If I do this: dynamic foo = new DynamicFoo(); foo.Name = "Joe"; foo.Name =…
JoshL
  • 1,706
  • 1
  • 12
  • 13
0
votes
2 answers

Missing System.Scripting in VS.Net 2010-Where can I find it?

I installed VS.Net 2010 to play around with some of the new C# features and I'm trying to use the IDynamicObject interface but I can't because it can't find the System.Scripting namespace. What do I need to install to get this? Thanks!
Jon
  • 2,085
  • 2
  • 20
  • 28