by Eloquera Team
22. July 2010 12:00
Here is a new release of the Eloquera DB. In the version 2.8 we have done some fixes and improvements – the list is on the download page.
Besides, now in the database creation scripts you can add types that you do not wish to have in the database, e.g., debug or runtime only objects. For example, you cannot restore Thread objects from the database, even though you can store them. The functionality can be used in a pretty simple way:
db.RegisterType(typeof(Book));
db.TypeRules.IgnoreType(typeof(DebugBook)).
IgnoreType(typeof(DebugAuthor)).
IgnoreType(typeof(InputServer));
That will add a rule to the database to ignore all objects, fields and properties of the specified types and of their descendant types.
Any newly created database has a list of types automatically added to the ignored type list:
System.Runtime.ConstrainedExecution.CriticalFinalizerObject
System.Type
System.Reflection.Assembly
System.AppDomain
System.ActivationContext
System.Exception
System.AppDomainManager
System.IAppDomainSetup
System.ApplicationId
System.ApplicationIdentity
System.Attribute
System.Threading.WaitHandle
System.Runtime.InteropServices._AssemblyName
System.Reflection.Binder
System.IntPtr
System.Signature
System.WeakReference
System.Threading.Timer
System.Threading.TimerBase
System.Threading.SynchronizationContext
System.Threading.Overlapped
System.IntPtr
System.Windows.Threading.Dispatcher
System.Windows.DependencyProperty
System.Threading.CompressedStack
System.Threading.Monitor
System.IO.Stream
System.Runtime.Serialization.SerializationInfo
MS.Utility.FrugalListBase<>
MS.Utility.FrugalObjectList<>
System.Windows.Media.UniqueEventHelper<>
System.Windows.Media.UniqueEventHelper
System.Windows.Media.ColorContext
We hope this feature will help avoiding problems with types that do not carry any useful information when persisted.
Happy programming!