Remoting Typed Datasets - the tryouts
Andres stepped up quickly with some hints to my previous blogentry. I tried out the ADO.NET Powertoys which contained several features. Because it was poorly documented, and I just needed one of the features, I think I'll wait for a later release.
I could have given DeKlarit a shot, but I simply like fiddeling with architecture too much to give away everything to a framework:)
The solution was updating the generated code for the typed datasets with serialization for the DataTable objects. Two additional lines of code is needed per DataTable, the one above and the one below the class def:
[Serializable()]
public class MyDataTable : DataTable, System.Collections.IEnumerable
{
iternal MyDataTable(SerializationInfo info, StreamingContext context) : base(info, context) {this.InitVars();}
}
In other words the inherited DataTable object needs the serialization attribute and to expose a constructor for serialization that passes the parameters directly to the baseclass. Doing this for every class every time it's regenerated really is no optimal solution, bot it does work over .NET Remoting.