fix xml deserialization bug; port class descriptor functionality from java to c#.