Romestead Assembly Reference

CandideServer.Saving.GameSaveManager

Type JSON

public class in CandideServer.Saving

Methods16
Properties0
Fields11
Events0
Type metadata
  • AssemblyCandideServer
  • NamespaceCandideServer.Saving
  • Base typeSystem.Object
  • HashC6A72085B28F6B08E20975FF0DE4A697ED08B2EFDCDAD9CF56396F0B0F0603CE

Relationships

Base type

System.Object

Fields

NameVisibilitySignature
AnalyticsFirstsprivateprivate System.String AnalyticsFirsts
AutoSaveEnabledpublicpublic System.Boolean AutoSaveEnabled
Deserializerpublicpublic CandideCreator.Shared.Serialization.CandideDeserializer Deserializer
GameStateSaveReflectionpublicpublic CandideCreator.Shared.Serialization.CandideReflection GameStateSaveReflection
GameStateSaveSerializerpublicpublic CandideCreator.Shared.Serialization.CandideSerializer GameStateSaveSerializer
TimeBetweenAutoSavespublicpublic System.TimeSpan TimeBetweenAutoSaves
_lastSaveTimeprivateprivate System.DateTime _lastSaveTime
_queuedSaveDirectoryprivateprivate System.String _queuedSaveDirectory
_saveQueuedOffThreadprivateprivate System.Boolean _saveQueuedOffThread
_savingTaskprivateprivate System.Threading.Tasks.Task _savingTask
_stopAfterSaveprivateprivate System.Boolean _stopAfterSave

Methods

CheckIsInvalidWorldName

public System.Boolean CheckIsInvalidWorldName(System.String worldName)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Boolean
  • StaticTrue
  • VirtualFalse
  • Hash23DCB38A71AFF0F3A3AA911B36E54D2DD1AE2DAD81CA6714DC63E2AD1FEE5C50
  • Body hash618B0AFB27DEA1A78220E1DDE276A92A148F1CAC23087673BCE84021F90E0215
  • IL size47
Referenced calls
  • System.String::IsNullOrWhiteSpace(System.String)
  • System.IO.Path::GetInvalidFileNameChars()
  • System.String::IndexOfAny(System.Char[])
  • System.String::Contains(System.Char)
  • System.String::Trim()
  • System.String::op_Inequality(System.String, System.String)
Called by

EmptyGameState

public System.Void EmptyGameState()

Method metadata
  • Visibilitypublic
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • Hash4D8DE8C5942DB6A741E9E10E63BD6BD622D4D1333DB98E660E6D140AC74C0982
  • Body hash88D1BD43B945B1419511825BC27386CF49ECB80939432B3915EAF3699B2C9F4E
  • IL size120
Referenced calls
  • System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
  • System.Type::GetMembers(System.Reflection.BindingFlags)
  • System.Reflection.FieldInfo::GetValue(System.Object)
  • System.Object::GetType()
  • System.Type::GetMethod(System.String, System.Reflection.BindingFlags, System.Type[])
  • System.Reflection.MethodBase::Invoke(System.Object, System.Object[])
  • System.Reflection.FieldInfo::get_FieldType()
  • CandideCreator.Shared.Serialization.CandideReflection::GetDefaultValue(System.Type)
  • System.Reflection.FieldInfo::SetValue(System.Object, System.Object)
Called by
String literals
  • Clear

EmptyRunState

public System.Void EmptyRunState()

Method metadata
  • Visibilitypublic
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • Hash047AD8CEFD66533242F3B4F3FC6A28FEAEA6BDF73199038D9D2D7F7C17411CC1
  • Body hash7464E1961B60A65E3D981997F25D7BA07F5ABD4561B927E83236AE32F6E61396
  • IL size120
Referenced calls
  • System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
  • System.Type::GetMembers(System.Reflection.BindingFlags)
  • System.Reflection.FieldInfo::GetValue(System.Object)
  • System.Object::GetType()
  • System.Type::GetMethod(System.String, System.Reflection.BindingFlags, System.Type[])
  • System.Reflection.MethodBase::Invoke(System.Object, System.Object[])
  • System.Reflection.FieldInfo::get_FieldType()
  • CandideCreator.Shared.Serialization.CandideReflection::GetDefaultValue(System.Type)
  • System.Reflection.FieldInfo::SetValue(System.Object, System.Object)
Called by
String literals
  • Clear

GetShallowDictionaryCopy

private System.Object GetShallowDictionaryCopy(System.Type type, System.Object source)

Method metadata
  • Visibilityprivate
  • Return typeSystem.Object
  • StaticTrue
  • VirtualFalse
  • Hash0C46CD385188D8D0CD935349968AED654762B1EA00BCE28DDE051F258CD66F8D
  • Body hash281DB31F53E6E92E776A0EA7328AA9D3B547F1F2B9EDA1F7F5F82879C9B19051
  • IL size90
Referenced calls
Called by

LoadGame

public System.Void LoadGame(CandideServer.GameDescription gameDescription, System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>> state)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • Hash4FE548EA6F0C0DE71C8D431E24D8EB03172C7C32D556BAB7F71C6C8D9838FB43
  • Body hash577086B7C5C4D159951B2C89718049999124314497A81C231B3456F01FE236AD
  • IL size57
Referenced calls
Called by
String literals
  • servergamestate-loaded

LoadGameDescriptionFromDirectory

public CandideServer.GameDescription LoadGameDescriptionFromDirectory(System.String directoryPath)

Method metadata
  • Visibilitypublic
  • Return typeCandideServer.GameDescription
  • StaticTrue
  • VirtualFalse
  • Hash592894D58BB7FD44C6B4851AE48D607EAD4CD98A8C7B0754FF9F1D1E62F4A791
  • Body hash207C00761EA1C0741F7CC122B40AC6DC98DF6E68C51824CAF60EE056E619A6F4
  • IL size348
Referenced calls
  • System.IO.Path::Combine(System.String, System.String)
  • System.IO.File::Exists(System.String)
  • System.IO.File::OpenRead(System.String)
  • CandideCreator.Shared.Serialization.CandideDeserializer::Clear()
  • CandideCreator.Shared.Serialization.CandideDeserializer::Deserialize(CandideCreator.Shared.Serialization.CandideReflection, System.IO.Stream, System.Boolean)
  • System.IO.Path::GetFileName(System.String)
  • System.IDisposable::Dispose()
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::.ctor(System.Int32, System.Int32)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendLiteral(System.String)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendFormatted(System.String)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendFormatted(!!0)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::ToStringAndClear()
  • CandideCreator.Shared.Helpers.WarningHelper::Warning(System.String)
Called by
String literals
  • world_desc
  • Error while loading world desc file '
  • ':
  • world_desc_backup
  • Error while loading world desc backup file '

LoadGameFromFile

public System.Boolean LoadGameFromFile(CandideServer.GameDescription description, System.String gameStateFilePath)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Boolean
  • StaticTrue
  • VirtualFalse
  • Hash00FF60272B824FD52D871A45A60C5315E1F82A3BBCFCFC62C593F980E9A1C8B3
  • Body hash1C3C2653726696340EF8B3C3E6BC6933983DFA34949D41578D5D28746783A322
  • IL size174
Referenced calls
String literals
  • Failed to load game state for game

LoadGameState

private System.Void LoadGameState(System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>> state)

Method metadata
  • Visibilityprivate
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • HashE8EF67353634D3C75760896DD1DC403C8AB5F121DCE1EC6E95C1A10770F6D7D3
  • Body hash081FD7FBD312FD00A318F20346CF5DEA69D04D6E7DDFCF19B113BD758C3D674D
  • IL size413
Referenced calls
  • CandideServer.Saving.GameSaveManager::EmptyRunState()
  • CandideServer.Saving.GameSaveManager::EmptyGameState()
  • GameSaveManager.<>c::<LoadGameState>b__26_0(System.ValueTuple<System.String, System.Object>)
  • System.Func<System.ValueTuple<System.String, System.Object>, System.String>::.ctor(System.Object, System.IntPtr)
  • GameSaveManager.<>c::<LoadGameState>b__26_1(System.ValueTuple<System.String, System.Object>)
  • System.Func<System.ValueTuple<System.String, System.Object>, System.Object>::.ctor(System.Object, System.IntPtr)
  • System.Linq.Enumerable::ToDictionary(System.Collections.Generic.IEnumerable<!!0>, System.Func<!!0, !!1>, System.Func<!!0, !!2>)
  • System.Collections.Generic.Dictionary<System.String, System.Object>::TryGetValue(!0, !1&)
  • System.Collections.Generic.Dictionary<System.String, Shared.Models.WorldFlag>::.ctor()
  • System.Collections.Generic.Dictionary<System.String, System.Object>::set_Item(!0, !1)
  • System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
  • System.Type::GetMembers(System.Reflection.BindingFlags)
  • System.Reflection.MemberInfo::get_Name()
  • System.String::op_Equality(System.String, System.String)
  • System.Reflection.FieldInfo::SetValue(System.Object, System.Object)
  • CandideCreator.Shared.Helpers.ServerWarningHelper::Warning(System.String)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::.ctor(System.Int32, System.Int32)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendLiteral(System.String)
  • System.Object::GetType()
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendFormatted(!!0)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::ToStringAndClear()
  • CandideServer.Models.Inventory.InventorySaveModel::ToSharedInventoryModel()
  • System.Collections.Generic.Dictionary<System.Guid, Shared.Models.Items.SharedInventoryModel>::set_Item(!0, !1)
Called by
String literals
  • WorldFlags
  • Inventories
  • SavedInventorySaveModels were null while loading world
  • Unknown saved inventory format
  • A saved inventory was null when loading game.
  • analytics_firsts

QueueSave

public System.Void QueueSave(System.String directoryPath, System.Boolean offThread, System.Boolean stopAfterSave)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • Hash9058E9008100855AA25C2FF28465226EABDE23832AE93E880D394207BD1B219B
  • Body hash37C84425C45B8C82BEA097621D260B37DD4E6F1CE0B850BDACB5630EC722BF63
  • IL size19
Called by

SaveGameState

public System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>> SaveGameState(System.Boolean forOffThreadSerializing)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Collections.Generic.List<System.ValueTuple<System.String, System.Object>>
  • StaticTrue
  • VirtualFalse
  • Hash35C3CABF442E4F89FADCD0CD1FB3567973E736639A65DD369B743650D89BAEAF
  • Body hash31A39FA1ECC004C08580B5CC0A22E1A40A61A18223E5A5A379854362D5872AB3
  • IL size778
Referenced calls
  • CandideServer.EventBus.EventBusManager::SendEvent(System.String, System.Object, System.Boolean)
  • System.DateTime::get_UtcNow()
  • System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>>::.ctor()
  • System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
  • System.Type::GetMembers(System.Reflection.BindingFlags)
  • System.Reflection.MemberInfo::get_Name()
  • System.String::op_Equality(System.String, System.String)
  • System.Reflection.FieldInfo::GetValue(System.Object)
  • System.Reflection.FieldInfo::get_FieldType()
  • CandideServer.Saving.GameSaveManager::GetShallowDictionaryCopy(System.Type, System.Object)
  • System.ValueTuple<System.String, System.Object>::.ctor(!0, !1)
  • System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>>::Add(!0)
  • System.Collections.Generic.HashSet<System.String>::get_Comparer()
  • System.Collections.Generic.HashSet<System.String>::.ctor(System.Collections.Generic.IEnumerable<!0>, System.Collections.Generic.IEqualityComparer<!0>)
  • System.Type::get_IsArray()
  • System.Collections.Generic.Dictionary<System.Guid, Shared.Models.Items.SharedInventoryModel>::get_Values()
  • Dictionary.ValueCollection<System.Guid, Shared.Models.Items.SharedInventoryModel>::GetEnumerator()
  • Dictionary.ValueCollection.Enumerator<System.Guid, Shared.Models.Items.SharedInventoryModel>::get_Current()
  • Dictionary.ValueCollection.Enumerator<System.Guid, Shared.Models.Items.SharedInventoryModel>::MoveNext()
  • System.IDisposable::Dispose()
  • CandideServer.Models.Inventory.InventorySaveModel::FromInventoryModel(Shared.Models.Items.SharedInventoryModel)
  • System.Collections.Generic.Dictionary<System.Guid, CandideServer.Entities.ServerEntityModel>::get_Values()
  • Dictionary.ValueCollection<System.Guid, CandideServer.Entities.ServerEntityModel>::get_Count()
  • System.Collections.Generic.Dictionary<System.Guid, CandideServer.Entities.ServerEntityModel>::.ctor(System.Int32)
  • Dictionary.ValueCollection<System.Guid, CandideServer.Entities.ServerEntityModel>::GetEnumerator()
  • Dictionary.ValueCollection.Enumerator<System.Guid, CandideServer.Entities.ServerEntityModel>::get_Current()
  • System.Collections.Generic.Dictionary<System.Guid, CandideServer.Entities.ServerEntityModel>::Add(!0, !1)
  • Dictionary.ValueCollection.Enumerator<System.Guid, CandideServer.Entities.ServerEntityModel>::MoveNext()
  • System.Collections.Generic.Dictionary<System.Guid, CandideServer.Models.Worlds.WorldModel>::get_Values()
  • Dictionary.ValueCollection<System.Guid, CandideServer.Models.Worlds.WorldModel>::get_Count()
  • System.Collections.Generic.Dictionary<System.Guid, CandideServer.Models.Worlds.WorldModel>::.ctor(System.Int32)
  • Dictionary.ValueCollection<System.Guid, CandideServer.Models.Worlds.WorldModel>::GetEnumerator()
Called by
String literals
  • before-servergamestate-saved
  • Inventories
  • Entities
  • Worlds
  • analytics_firsts

SaveGameToDirectory

public System.Threading.Tasks.Task SaveGameToDirectory(System.String directoryPath, System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>> gameState, System.Boolean sendNetworkMessages, System.Boolean sendLockInMessage)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Threading.Tasks.Task
  • StaticTrue
  • VirtualFalse
  • Hash134A391C9AF7C99ED4DBE873AED51D9D480819C4CFC3B14816D4F05144877BD4
  • Body hash198F21E287742EA8D84AC7CDF71F961F198E31AAEA43C9FBAFFB1B17497EBFAF
  • IL size284
Referenced calls
Called by
String literals
  • HostServer_SavingGame
  • game_state
  • game_state_temp
  • game_state_backup
  • HostServer_DataLockedInForSaving

SaveNewGameToDirectory

public System.Boolean SaveNewGameToDirectory(System.String directoryPath, CandideServer.GameDescription gameDescription, System.Collections.Generic.List<System.ValueTuple<System.String, System.Object>> state, System.Action onSaveError)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Boolean
  • StaticTrue
  • VirtualFalse
  • HashA39B74D29CAE0D9FD9DEFF59AB181CF67471DEF284D132216F0AC340CC44A012
  • Body hash4A462EF24A0EA82A56A5B6C75AF4B728C42E1A977A2774441BBFB7DD6EB2714D
  • IL size295
Referenced calls
  • System.IO.Directory::CreateDirectory(System.String)
  • System.IO.Path::Combine(System.String, System.String)
  • System.IO.File::Exists(System.String)
  • System.Action::Invoke()
  • System.IO.File::Create(System.String)
  • CandideCreator.Shared.Serialization.CandideSerializer::Serialize(CandideCreator.Shared.Serialization.CandideReflection, System.IO.Stream, !!0, System.Boolean)
  • System.IO.Compression.GZipStream::.ctor(System.IO.Stream, System.IO.Compression.CompressionLevel)
  • System.IO.FileStream::Flush(System.Boolean)
  • System.IDisposable::Dispose()
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::.ctor(System.Int32, System.Int32)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendLiteral(System.String)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendFormatted(!!0)
  • System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::ToStringAndClear()
  • CandideCreator.Shared.Helpers.WarningHelper::Warning(System.String)
String literals
  • world_desc
  • game_state
  • Error while saving new world:

SaveWithCallbacks

public System.Threading.Tasks.Task SaveWithCallbacks(System.String saveDirectoryPath, System.Action<System.Int32> saveStepCallback)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Threading.Tasks.Task
  • StaticTrue
  • VirtualFalse
  • HashE1FC958EDB7D93E2D9518984AD67F9E5D5B44CED44E2053E4827AF375FB7D50B
  • Body hash017DFA08FC6384AC9FD4AD4840D3D965D54DEFE99A7E426D189D86D0A994939E
  • IL size36
Referenced calls
  • GameSaveManager.<>c__DisplayClass15_0::.ctor()
  • GameSaveManager.<>c__DisplayClass15_0::<SaveWithCallbacks>b__0()
  • System.Func<System.Threading.Tasks.Task>::.ctor(System.Object, System.IntPtr)
  • System.Threading.Tasks.Task::Run(System.Func<System.Threading.Tasks.Task>)
Called by

SaveWorldDescToDirectory

public System.Threading.Tasks.Task SaveWorldDescToDirectory(System.String directoryPath, CandideServer.GameDescription desc)

Method metadata
  • Visibilitypublic
  • Return typeSystem.Threading.Tasks.Task
  • StaticTrue
  • VirtualFalse
  • Hash0F337636FBA0A034EB8C909255088DC36127572F599CA3976CA3640292C50D02
  • Body hash11E7342193D049DACB9F23A75ADD8A90208A5978C706B3A392F992E916624F73
  • IL size137
Referenced calls
  • GameSaveManager.<>c__DisplayClass17_0::.ctor()
  • System.IO.Path::Combine(System.String, System.String)
  • System.IO.MemoryStream::.ctor()
  • CandideCreator.Shared.Serialization.CandideSerializer::Serialize(CandideCreator.Shared.Serialization.CandideReflection, System.IO.Stream, !!0, System.Boolean)
  • System.IO.Stream::set_Position(System.Int64)
  • GameSaveManager.<>c__DisplayClass17_0::<SaveWorldDescToDirectory>b__0()
  • System.Action::.ctor(System.Object, System.IntPtr)
  • System.Threading.Tasks.Task::Run(System.Action)
  • System.IDisposable::Dispose()
Called by
String literals
  • world_desc
  • world_desc_temp
  • world_desc_backup

Update

public System.Void Update()

Method metadata
  • Visibilitypublic
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • HashFDCAAAF2CA59D5CE8C989DF0E67647EFABDC068B44FF725CA6637C1F4548F19F
  • Body hashD168485ECB2317F78FC02C88CB9F1301971DCC848C17BAF81EFD9DCE47064803
  • IL size231
Referenced calls
Called by

UpdateAutoSave

private System.Void UpdateAutoSave()

Method metadata
  • Visibilityprivate
  • Return typeSystem.Void
  • StaticTrue
  • VirtualFalse
  • HashB130EB47ADC0659C5CA12CDC4BC0C21EC5117BDF2CDD6ECD37B6BE6A42D3C0D8
  • Body hash14CE04256DAD7E54376D2FDDB73940F7AE2F2E92E47DD60957EED203BA0A0CF2
  • IL size75
Referenced calls
Called by