C# Class WhiteCore.Framework.Utilities.Utilities

Afficher le fichier Open project: WhiteCoreSim/WhiteCore-Dev

Méthodes publiques

Свойство Type Description
HostName string
RegionNames string[]
UserNames string[]

Méthodes publiques

Méthode Description
Decrypt ( string cipherText, string passPhrase, string saltValue ) : string

Decrypts specified ciphertext using Rijndael symmetric key algorithm.

Most of the logic in this function is similar to the Encrypt logic. In order for decryption to work, all parameters of this function - except cipherText value - must match the corresponding parameters of the Encrypt function which was called to generate the ciphertext.

DownloadFile ( string downloadLink, string filename ) : void

Download the file from downloadLink and save it to WhiteCore + Version +

DownloadFileAsync ( string downloadLink, string filename, DownloadProgressChangedEventHandler onProgress, AsyncCompletedEventHandler onComplete ) : void

Downloads a file async

Encrypt ( string plainText, string passPhrase, string saltValue ) : string

Encrypts specified plaintext using Rijndael symmetric key algorithm and returns a base64-encoded result.

GetAddress ( ) : string

Get the URL to our sim

GetExternalIp ( ) : string

Get OUR external IP

GetLocalIp ( ) : string

Get local IP address of system (Assumes only one address present... or gives the first valid address if mmultiple)

GetMaxMaturity ( int Maturity ) : string
GetNextWeekday ( System.DateTime start, DayOfWeek day ) : System.DateTime
GetRegionMaturity ( int Maturity ) : string
GetServerReleaseNotesURL ( ) : string

Get the URL to the release notes for the current version of WhiteCore

GetShortRegionMaturity ( int Maturity ) : string
IsSystemUser ( OpenMetaverse userID ) : bool

Determines whether the specified userID is a system user.

IsValidEmail ( string address ) : bool

Determines whether a string is a valid email address.

ReadExternalWebsite ( string URL ) : string

Read a website into a string

RoundDown ( System.DateTime dt, System.TimeSpan d ) : System.DateTime
RoundToNearest ( System.DateTime dt, System.TimeSpan d ) : System.DateTime
RoundUp ( System.DateTime dt, System.TimeSpan d ) : System.DateTime

Rounds up a DateTime to the nearest

SetEncryptIterations ( int iterations ) : void

This is for encryption, it sets the number of times to iterate through the encryption

SetEncryptorType ( string type ) : void
SetKeySize ( int size ) : void

This is for encryption, it sets the size of the key

TransactionTypeInfo ( TransactionType transType ) : string
WhiteCoreServerVersion ( ) : string

What is our version?

Private Methods

Méthode Description
UnGzip ( byte data, int start ) : byte[]

Method Details

Decrypt() public static méthode

Decrypts specified ciphertext using Rijndael symmetric key algorithm.
Most of the logic in this function is similar to the Encrypt logic. In order for decryption to work, all parameters of this function - except cipherText value - must match the corresponding parameters of the Encrypt function which was called to generate the ciphertext.
public static Decrypt ( string cipherText, string passPhrase, string saltValue ) : string
cipherText string /// Base64-formatted ciphertext value. ///
passPhrase string /// Passphrase from which a pseudo-random password will be derived. The /// derived password will be used to generate the encryption key. /// Passphrase can be any string. In this example we assume that this /// passphrase is an ASCII string. ///
saltValue string /// Salt value used along with passphrase to generate password. Salt can /// be any string. In this example we assume that salt is an ASCII string. ///
Résultat string

DownloadFile() public static méthode

Download the file from downloadLink and save it to WhiteCore + Version +
public static DownloadFile ( string downloadLink, string filename ) : void
downloadLink string Link to the download
filename string Name to put the download in
Résultat void

DownloadFileAsync() public static méthode

Downloads a file async
public static DownloadFileAsync ( string downloadLink, string filename, DownloadProgressChangedEventHandler onProgress, AsyncCompletedEventHandler onComplete ) : void
downloadLink string
filename string
onProgress DownloadProgressChangedEventHandler can be null
onComplete AsyncCompletedEventHandler can be null
Résultat void

Encrypt() public static méthode

Encrypts specified plaintext using Rijndael symmetric key algorithm and returns a base64-encoded result.
public static Encrypt ( string plainText, string passPhrase, string saltValue ) : string
plainText string /// Plaintext value to be encrypted. ///
passPhrase string /// Passphrase from which a pseudo-random password will be derived. The /// derived password will be used to generate the encryption key. /// Passphrase can be any string. In this example we assume that this /// passphrase is an ASCII string. ///
saltValue string /// Salt value used along with passphrase to generate password. Salt can /// be any string. In this example we assume that salt is an ASCII string. ///
Résultat string

GetAddress() public static méthode

Get the URL to our sim
public static GetAddress ( ) : string
Résultat string

GetExternalIp() public static méthode

Get OUR external IP
public static GetExternalIp ( ) : string
Résultat string

GetLocalIp() public static méthode

Get local IP address of system (Assumes only one address present... or gives the first valid address if mmultiple)
public static GetLocalIp ( ) : string
Résultat string

GetMaxMaturity() public static méthode

public static GetMaxMaturity ( int Maturity ) : string
Maturity int
Résultat string

GetNextWeekday() public static méthode

public static GetNextWeekday ( System.DateTime start, DayOfWeek day ) : System.DateTime
start System.DateTime
day DayOfWeek
Résultat System.DateTime

GetRegionMaturity() public static méthode

public static GetRegionMaturity ( int Maturity ) : string
Maturity int
Résultat string

GetServerReleaseNotesURL() public static méthode

Get the URL to the release notes for the current version of WhiteCore
public static GetServerReleaseNotesURL ( ) : string
Résultat string

GetShortRegionMaturity() public static méthode

public static GetShortRegionMaturity ( int Maturity ) : string
Maturity int
Résultat string

IsSystemUser() public static méthode

Determines whether the specified userID is a system user.
public static IsSystemUser ( OpenMetaverse userID ) : bool
userID OpenMetaverse User I.
Résultat bool

IsValidEmail() public static méthode

Determines whether a string is a valid email address.
public static IsValidEmail ( string address ) : bool
address string Address.
Résultat bool

ReadExternalWebsite() public static méthode

Read a website into a string
public static ReadExternalWebsite ( string URL ) : string
URL string URL to change into a string
Résultat string

RoundDown() public static méthode

public static RoundDown ( System.DateTime dt, System.TimeSpan d ) : System.DateTime
dt System.DateTime
d System.TimeSpan
Résultat System.DateTime

RoundToNearest() public static méthode

public static RoundToNearest ( System.DateTime dt, System.TimeSpan d ) : System.DateTime
dt System.DateTime
d System.TimeSpan
Résultat System.DateTime

RoundUp() public static méthode

Rounds up a DateTime to the nearest
public static RoundUp ( System.DateTime dt, System.TimeSpan d ) : System.DateTime
dt System.DateTime DateTime
d System.TimeSpan Delta time
Résultat System.DateTime

SetEncryptIterations() public static méthode

This is for encryption, it sets the number of times to iterate through the encryption
public static SetEncryptIterations ( int iterations ) : void
iterations int
Résultat void

SetEncryptorType() public static méthode

public static SetEncryptorType ( string type ) : void
type string
Résultat void

SetKeySize() public static méthode

This is for encryption, it sets the size of the key
public static SetKeySize ( int size ) : void
size int
Résultat void

TransactionTypeInfo() public static méthode

public static TransactionTypeInfo ( TransactionType transType ) : string
transType TransactionType
Résultat string

WhiteCoreServerVersion() public static méthode

What is our version?
public static WhiteCoreServerVersion ( ) : string
Résultat string

Property Details

HostName public_oe static_oe property

public static string HostName
Résultat string

RegionNames public_oe static_oe property

public static string[] RegionNames
Résultat string[]

UserNames public_oe static_oe property

public static string[] UserNames
Résultat string[]