1

I'm using LINQPad (2.42) to test some snippets that make use of SharePoint Client Object Model.

Basically messing with SPSite, SPWeb, SPList, SPFolder and SPFile.

The problem is that LINQPad seems to dislike calling .Dump() for any of the previous objects. It just keeps "Executing" for ever without showing any results.

Does anyone experience the same problem? Any workaround or fix?

Thanks

empz
  • 11,509
  • 16
  • 65
  • 106

1 Answers1

4

Try calling .Dump(0) to only dump the first level of Properties, or dumping the results to a Grid.

I have not looked at the SharePoint Client Objects but if they are anything like the TFS API classes, some of the properties are lazy loaded. Calling .Dump() will walk it's way down each every single result making server calls for every property (and property of property, etc.). This is probably what's taking the time.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141
  • Great, both solutions worked. Is there any available documentation about LINQPad methods like Dump()? – empz Jul 03 '12 at 20:41
  • @emzero I don't know, I have been following the beta release notes for about a year now. – DaveShaw Jul 03 '12 at 20:43
  • @emzero - Have a look at "Help" > "What's New" from within LinqPad. It mentions that `Dump()` has a depth option (2.20 / 4.20) and "Results to Grid" are lazy loaded (2.42 / 4.42). – DaveShaw Jul 03 '12 at 20:48