/// <summary> /// Calculates the size in-memory of the given type. /// </summary> /// <param name="type">A name to assign to the memory-mapped file.</param> public static int GetSize(Type type) { if (_getSizeDelegate == null) { // oeps, not initialized. throw new InvalidOperationException("MemoryMappedFile get size not initialized, call OsmSharp.{Platform).UI.Native.Initialize() in the native code."); } return(_getSizeDelegate.Invoke(type)); }