Added serializer precompile to preload step for kdbp files

This commit is contained in:
AlexVallat
2013-08-15 18:49:27 +01:00
parent 4cbc4542c2
commit bb0827ea51
2 changed files with 14 additions and 0 deletions

View File

@@ -15,6 +15,14 @@ namespace KeePassLib.Serialization
{
public const string FileNameExtension = "kdbp";
/// <summary>
/// Precompiles the serializer classes for faster first-run execution
/// </summary>
public static void PrepareSerializer()
{
RuntimeTypeModel.Default[typeof(PwDatabaseBuffer)].CompileInPlace();
}
/// <summary>
/// Determines whether the database pointed to by the specified ioc should be (de)serialised in default (xml) or protocol buffers format.
/// </summary>