CodeDom in an IServerObjectExtension
ServerObjectExtensions in 9.2 provide an efficient way to do “fine grain” stuff in AGS. For example, looping through each feature in a large featureclass and intersecting it with some other geometry to produce a System.Data.Dataset.
I wonder if it would be possible to make a generic ServerObjectExtension that takes source code passed in as an argument, compiles & runs it (via CodeDOM), and returns a Dataset? Or better yet, perhaps it would be possible to take a spatial SQL statement, transform it into C# code, then pass that to the ServerObjectExtension. Granted, Spatial SQL should now be supported in ArcSDE 9.2 for Oracle, but this approach should work for SQLServer too.