TCultureInfo Translator

This topic applies to .NET version only.

CultureInfo class cannot be stored cleanly by db4o because it internally holds a native pointer to a system structure. This problem was discussed in detail in .NET Example Class and a solution suggested in .NET Translator Implementation. In fact built-in TCultureInfo class implements the same solution and can be used immediately without any custom translators:

c#:

configuration.ObjectClass(typeof(CultureInfo)).Translate(new CultureInfoTranslator());

VB:

configuration.ObjectClass(GetType(CultureInfo)).Translate(New CultureInfoTranslator())