C# Class Wolfje.Plugins.SEconomy.Journal.XMLJournal.XmlTransactionJournal

Holds an XML representation of the SEconomy transaction journal.
Inheritance: ITransactionJournal
Show file Open project: tylerjwatson/SEconomy Class Usage Examples

Public Properties

Property Type Description
XmlSchemaVersion System.Version
__writeLock object

Private Properties

Property Type Description
BeginSourceTransaction ITransaction
FinishEndTransaction ITransaction
GZipDecompress System.IO.MemoryStream
NewJournal System.Xml.Linq.XDocument
TransferMaySucceed bool

Public Methods

Method Description
AddBankAccount ( IBankAccount Account ) : IBankAccount
AddBankAccount ( string UserAccountName, long WorldID, BankAccountFlags Flags, string Description ) : IBankAccount
BackupJournal ( ) : void
BackupJournalAsync ( ) : Task
BindTransactions ( ITransaction &SourceTransaction, ITransaction &DestTransaction ) : void
CleanJournal ( PurgeOptions options ) : void
DeleteBankAccount ( long BankAccountK ) : void
DeleteBankAccountAsync ( long BankAccountK ) : Task
Dispose ( ) : void
DumpSummary ( ) : void
GetBankAccount ( long BankAccountK ) : IBankAccount
GetBankAccountByName ( string UserAccountName ) : IBankAccount
GetBankAccountList ( long BankAccountK ) : IEnumerable
GetWorldAccount ( ) : IBankAccount

Returns a world account for the current running world. If it does not exist, one gets created and then returned.

LoadJournal ( ) : bool
LoadJournalAsync ( ) : Task
RandomString ( int Size ) : string

Thread-safely generates a random sequence of characters

SaveJournal ( ) : void
SaveJournalAsync ( ) : Task
SquashJournalAsync ( ) : Task
TransferBetween ( IBankAccount FromAccount, IBankAccount ToAccount, Money Amount, BankAccountTransferOptions Options, string TransactionMessage, string JournalMessage ) : BankTransferEventArgs
TransferBetweenAsync ( IBankAccount FromAccount, IBankAccount ToAccount, Money Amount, BankAccountTransferOptions Options, string TransactionMessage, string JournalMessage ) : Task
XmlTransactionJournal ( SEconomy Parent, string JournalSavePath ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void
JournalBackupTimer_Elapsed ( object sender, System e ) : void

Occurs when the journal backup timer fires, and performs a journal save.

Private Methods

Method Description
BeginSourceTransaction ( long BankAccountK, Money Amount, string Message ) : ITransaction
FinishEndTransaction ( long SourceBankTransactionKey, IBankAccount ToAccount, Money Amount, string Message ) : ITransaction
GZipDecompress ( byte CompressedData ) : MemoryStream

Delfates a GZip byte array and returns the uncompressed data.

NewJournal ( ) : System.Xml.Linq.XDocument
TransferMaySucceed ( IBankAccount FromAccount, IBankAccount ToAccount, Money MoneyNeeded, Journal Options ) : bool

Method Details

AddBankAccount() public method

public AddBankAccount ( IBankAccount Account ) : IBankAccount
Account IBankAccount
return IBankAccount

AddBankAccount() public method

public AddBankAccount ( string UserAccountName, long WorldID, BankAccountFlags Flags, string Description ) : IBankAccount
UserAccountName string
WorldID long
Flags BankAccountFlags
Description string
return IBankAccount

BackupJournal() public method

public BackupJournal ( ) : void
return void

BackupJournalAsync() public method

public BackupJournalAsync ( ) : Task
return Task

BindTransactions() public method

public BindTransactions ( ITransaction &SourceTransaction, ITransaction &DestTransaction ) : void
SourceTransaction ITransaction
DestTransaction ITransaction
return void

CleanJournal() public method

public CleanJournal ( PurgeOptions options ) : void
options PurgeOptions
return void

DeleteBankAccount() public method

public DeleteBankAccount ( long BankAccountK ) : void
BankAccountK long
return void

DeleteBankAccountAsync() public method

public DeleteBankAccountAsync ( long BankAccountK ) : Task
BankAccountK long
return Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DumpSummary() public method

public DumpSummary ( ) : void
return void

GetBankAccount() public method

public GetBankAccount ( long BankAccountK ) : IBankAccount
BankAccountK long
return IBankAccount

GetBankAccountByName() public method

public GetBankAccountByName ( string UserAccountName ) : IBankAccount
UserAccountName string
return IBankAccount

GetBankAccountList() public method

public GetBankAccountList ( long BankAccountK ) : IEnumerable
BankAccountK long
return IEnumerable

GetWorldAccount() public method

Returns a world account for the current running world. If it does not exist, one gets created and then returned.
public GetWorldAccount ( ) : IBankAccount
return IBankAccount

JournalBackupTimer_Elapsed() protected method

Occurs when the journal backup timer fires, and performs a journal save.
protected JournalBackupTimer_Elapsed ( object sender, System e ) : void
sender object
e System
return void

LoadJournal() public method

public LoadJournal ( ) : bool
return bool

LoadJournalAsync() public method

public LoadJournalAsync ( ) : Task
return Task

RandomString() public static method

Thread-safely generates a random sequence of characters
public static RandomString ( int Size ) : string
Size int
return string

SaveJournal() public method

public SaveJournal ( ) : void
return void

SaveJournalAsync() public method

public SaveJournalAsync ( ) : Task
return Task

SquashJournalAsync() public method

public SquashJournalAsync ( ) : Task
return Task

TransferBetween() public method

public TransferBetween ( IBankAccount FromAccount, IBankAccount ToAccount, Money Amount, BankAccountTransferOptions Options, string TransactionMessage, string JournalMessage ) : BankTransferEventArgs
FromAccount IBankAccount
ToAccount IBankAccount
Amount Money
Options BankAccountTransferOptions
TransactionMessage string
JournalMessage string
return BankTransferEventArgs

TransferBetweenAsync() public method

public TransferBetweenAsync ( IBankAccount FromAccount, IBankAccount ToAccount, Money Amount, BankAccountTransferOptions Options, string TransactionMessage, string JournalMessage ) : Task
FromAccount IBankAccount
ToAccount IBankAccount
Amount Money
Options BankAccountTransferOptions
TransactionMessage string
JournalMessage string
return Task

XmlTransactionJournal() public method

public XmlTransactionJournal ( SEconomy Parent, string JournalSavePath ) : System
Parent SEconomy
JournalSavePath string
return System

Property Details

XmlSchemaVersion public property

Returns the version of the XML schema built into this dll
public Version,System XmlSchemaVersion
return System.Version

__writeLock public static property

public static object __writeLock
return object