// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/BaseTypes.h"
///
/// The options for creation of the managed assembly.
///
struct MAssemblyOptions
{
public:
///
/// Should assembly cache classes on Load method.
///
int32 PreCacheOnLoad : 1;
///
/// Locks DLL/exe file with managed code.
///
int32 KeepManagedFileLocked : 1;
///
/// Initial dictionary size (prevents memory partition for bigger assemblies).
///
int32 DictionaryInitialSize;
public:
///
/// Initializes a new instance of the struct.
///
MAssemblyOptions()
: PreCacheOnLoad(true)
, KeepManagedFileLocked(false)
, DictionaryInitialSize(1024)
{
}
///
/// Initializes a new instance of the struct.
///
/// if set to true to precache assembly metadata on load.
/// if set to true keep managed file locked after load.
/// Initial size of the dictionary for the classes and metadata.
MAssemblyOptions(bool preCacheOnLoad, bool keepManagedFileLocked = false, int32 dictionaryInitialSize = 1024)
: PreCacheOnLoad(preCacheOnLoad)
, KeepManagedFileLocked(keepManagedFileLocked)
, DictionaryInitialSize(dictionaryInitialSize)
{
}
};