C# Класс WhiteCore.Modules.FileBasedSimulationData

FileBased DataStore, do not store anything in any databases, instead save .sim files for it
Наследование: ISimulationDataStore, IDisposable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_oldRegionLoader IRegionDataLoader
_regionData RegionData
_regionLoader IRegionDataLoader
defaultDataPath string
m_backupSaveTimer System.Timers.Timer
m_displayNotSavingNotice bool
m_fileName string
m_keepOldSave bool
m_mapcenter_x int
m_mapcenter_y int
m_oldSaveDirectory string
m_oldSaveHasBeenSaved bool
m_regionNameSeed string[]
m_removeArchiveDays int
m_requiresSave bool
m_saveBackupChanges bool
m_saveBackups bool
m_saveChanges bool
m_saveLock object
m_saveTimer System.Timers.Timer
m_scene IScene
m_shutdown bool
m_storeDirectory string
m_timeBetweenBackupSaves int
m_timeBetweenSaves int

Открытые методы

Метод Описание
CacheDispose ( ) : void
CleanupRegionBackups ( IScene scene, string cmds ) : void

Cleanups the old region backups.

Copy ( ) : ISimulationDataStore
CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
CreateNewRegion ( ISimulationBase simBase, WhiteCore.Framework.SceneInfo.RegionInfo regionInfo, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo

Initializes a new region using the passed regioninfo

CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
DeleteUpOldArchives ( int daysOld ) : void
Dispose ( ) : void
FileBasedSimulationData ( ) : System
FindBackupRegionFiles ( ) : List
FindRegionBackupFiles ( string regionName ) : List
FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
ForceBackup ( ) : void
GetLastBackupFileName ( string regionName ) : string
Initialise ( ) : void
LoadLandObjects ( ) : List

Around for legacy things

LoadObjects ( ) : List
LoadRegionInfo ( string fileName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RemoveRegion ( ) : void
RestoreBackupFile ( string fileName, string regionName ) : bool
RestoreLastBackup ( string regionName ) : bool

Restores the last backup.

SetRegion ( IScene scene ) : void
Shutdown ( ) : void
Tainted ( ) : void
UpdateRegionInfo ( IScene scene, string cmds ) : void

Updates the region info, allowing for changes etc.

UpdateRegionPrims ( IScene scene, string cmds ) : void

Sets the region prim capacity.

Защищенные методы

Метод Описание
ReadBackup ( string fileName ) : void
ReadConfig ( ISimulationBase simBase ) : void

Read the config for the data loader

SaveBackup ( bool isOldSave ) : void

Save a backup of the sim

SerializeDateTime ( ) : string
UpdateRegionCapacity ( ) : void
m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup into the oldSaveDirectory on the timer event

m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup on the timer event

Приватные методы

Метод Описание
BuildOldSaveFileName ( ) : string
BuildSaveFileName ( ) : string
BuildSaveFileName ( string name ) : string
CreateRegionFromConsole ( WhiteCore.Framework.SceneInfo.RegionInfo info, bool prompt, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo

Creates/updates a region from console.

GetRegionArchives ( ) : List

Gets any region preset OAR files.

GetRegionLocation ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the region location.

GetRegionName ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the name of the region.

GetRegionOptional ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the region optional settings.

GetRegionSize ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo ) : bool

Gets the size of the region.

ModifyRegionSettings ( WhiteCore.Framework.SceneInfo.RegionInfo &regInfo, bool advanced ) : bool

Modifies the region settings.

ReadFromData ( byte data ) : ITerrainChannel
WhiteCoreEventManager_OnGenericEvent ( string FunctionName, object parameters ) : object

Look for the backup event, and if it is there, trigger the backup of the sim

WriteTerrainToStream ( ITerrainChannel tModule ) : byte[]

Описание методов

CacheDispose() публичный Метод

public CacheDispose ( ) : void
Результат void

CleanupRegionBackups() публичный Метод

Cleanups the old region backups.
public CleanupRegionBackups ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Результат void

Copy() публичный Метод

public Copy ( ) : ISimulationDataStore
Результат ISimulationDataStore

CreateNewRegion() публичный Метод

public CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase
currentInfo int>.Dictionary
Результат WhiteCore.Framework.SceneInfo.RegionInfo

CreateNewRegion() публичный Метод

Initializes a new region using the passed regioninfo
public CreateNewRegion ( ISimulationBase simBase, WhiteCore.Framework.SceneInfo.RegionInfo regionInfo, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase Sim base.
regionInfo WhiteCore.Framework.SceneInfo.RegionInfo Region info.
currentInfo int>.Dictionary Current region info.
Результат WhiteCore.Framework.SceneInfo.RegionInfo

CreateNewRegion() публичный Метод

public CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : WhiteCore.Framework.SceneInfo.RegionInfo
simBase ISimulationBase
regionName string
currentInfo int>.Dictionary
Результат WhiteCore.Framework.SceneInfo.RegionInfo

DeleteUpOldArchives() публичный Метод

public DeleteUpOldArchives ( int daysOld ) : void
daysOld int
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FileBasedSimulationData() публичный Метод

public FileBasedSimulationData ( ) : System
Результат System

FindBackupRegionFiles() публичный Метод

public FindBackupRegionFiles ( ) : List
Результат List

FindRegionBackupFiles() публичный Метод

public FindRegionBackupFiles ( string regionName ) : List
regionName string
Результат List

FindRegionInfos() публичный Метод

public FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
newRegion bool
simBase ISimulationBase
Результат List

ForceBackup() публичный Метод

public ForceBackup ( ) : void
Результат void

GetLastBackupFileName() публичный Метод

public GetLastBackupFileName ( string regionName ) : string
regionName string
Результат string

Initialise() публичный Метод

public Initialise ( ) : void
Результат void

LoadLandObjects() публичный Метод

Around for legacy things
public LoadLandObjects ( ) : List
Результат List

LoadObjects() публичный Метод

public LoadObjects ( ) : List
Результат List

LoadRegionInfo() публичный Метод

public LoadRegionInfo ( string fileName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
fileName string
simBase ISimulationBase
Результат WhiteCore.Framework.SceneInfo.RegionInfo

LoadRegionNameInfo() публичный Метод

public LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : WhiteCore.Framework.SceneInfo.RegionInfo
regionName string
simBase ISimulationBase
Результат WhiteCore.Framework.SceneInfo.RegionInfo

LoadTerrain() публичный Метод

public LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
Результат void

LoadWater() публичный Метод

public LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
Результат void

ReadBackup() защищенный Метод

protected ReadBackup ( string fileName ) : void
fileName string
Результат void

ReadConfig() защищенный Метод

Read the config for the data loader
protected ReadConfig ( ISimulationBase simBase ) : void
simBase ISimulationBase
Результат void

RemoveRegion() публичный Метод

public RemoveRegion ( ) : void
Результат void

RestoreBackupFile() публичный Метод

public RestoreBackupFile ( string fileName, string regionName ) : bool
fileName string
regionName string
Результат bool

RestoreLastBackup() публичный Метод

Restores the last backup.
public RestoreLastBackup ( string regionName ) : bool
regionName string Region name.
Результат bool

SaveBackup() защищенный Метод

Save a backup of the sim
protected SaveBackup ( bool isOldSave ) : void
isOldSave bool
Результат void

SerializeDateTime() защищенный Метод

protected SerializeDateTime ( ) : string
Результат string

SetRegion() публичный Метод

public SetRegion ( IScene scene ) : void
scene IScene
Результат void

Shutdown() публичный Метод

public Shutdown ( ) : void
Результат void

Tainted() публичный Метод

public Tainted ( ) : void
Результат void

UpdateRegionCapacity() защищенный Метод

protected UpdateRegionCapacity ( ) : void
Результат void

UpdateRegionInfo() публичный Метод

Updates the region info, allowing for changes etc.
public UpdateRegionInfo ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Результат void

UpdateRegionPrims() публичный Метод

Sets the region prim capacity.
public UpdateRegionPrims ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
Результат void

m_backupSaveTimer_Elapsed() защищенный Метод

Save a backup into the oldSaveDirectory on the timer event
protected m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
Результат void

m_saveTimer_Elapsed() защищенный Метод

Save a backup on the timer event
protected m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
Результат void

Описание свойств

_oldRegionLoader защищенное свойство

protected IRegionDataLoader _oldRegionLoader
Результат IRegionDataLoader

_regionData защищенное свойство

protected RegionData,WhiteCore.Modules _regionData
Результат RegionData

_regionLoader защищенное свойство

protected IRegionDataLoader _regionLoader
Результат IRegionDataLoader

defaultDataPath защищенное свойство

protected string defaultDataPath
Результат string

m_backupSaveTimer защищенное свойство

protected Timer,System.Timers m_backupSaveTimer
Результат System.Timers.Timer

m_displayNotSavingNotice защищенное свойство

protected bool m_displayNotSavingNotice
Результат bool

m_fileName защищенное свойство

protected string m_fileName
Результат string

m_keepOldSave защищенное свойство

protected bool m_keepOldSave
Результат bool

m_mapcenter_x защищенное свойство

protected int m_mapcenter_x
Результат int

m_mapcenter_y защищенное свойство

protected int m_mapcenter_y
Результат int

m_oldSaveDirectory защищенное свойство

protected string m_oldSaveDirectory
Результат string

m_oldSaveHasBeenSaved защищенное свойство

protected bool m_oldSaveHasBeenSaved
Результат bool

m_regionNameSeed защищенное свойство

protected string[] m_regionNameSeed
Результат string[]

m_removeArchiveDays защищенное свойство

protected int m_removeArchiveDays
Результат int

m_requiresSave защищенное свойство

protected bool m_requiresSave
Результат bool

m_saveBackupChanges защищенное свойство

protected bool m_saveBackupChanges
Результат bool

m_saveBackups защищенное свойство

protected bool m_saveBackups
Результат bool

m_saveChanges защищенное свойство

protected bool m_saveChanges
Результат bool

m_saveLock защищенное свойство

protected object m_saveLock
Результат object

m_saveTimer защищенное свойство

protected Timer,System.Timers m_saveTimer
Результат System.Timers.Timer

m_scene защищенное свойство

protected IScene m_scene
Результат IScene

m_shutdown защищенное свойство

protected bool m_shutdown
Результат bool

m_storeDirectory защищенное свойство

protected string m_storeDirectory
Результат string

m_timeBetweenBackupSaves защищенное свойство

protected int m_timeBetweenBackupSaves
Результат int

m_timeBetweenSaves защищенное свойство

protected int m_timeBetweenSaves
Результат int