C# Класс Universe.Framework.Utilities.Utilities

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
HostName string
RegionNames string[]
UserNames string[]

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

Метод Описание
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 Universe + 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 Universe

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

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
UniverseServerVersion ( ) : string

What is our version?

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

Метод Описание
UnGzip ( byte data, int start ) : byte[]

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

Decrypt() публичный статический Метод

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. ///
Результат string

DownloadFile() публичный статический Метод

Download the file from downloadLink and save it to Universe + Version +
public static DownloadFile ( string downloadLink, string filename ) : void
downloadLink string Link to the download
filename string Name to put the download in
Результат void

DownloadFileAsync() публичный статический Метод

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
Результат void

Encrypt() публичный статический Метод

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. ///
Результат string

GetAddress() публичный статический Метод

Get the URL to our sim
public static GetAddress ( ) : string
Результат string

GetExternalIp() публичный статический Метод

Get OUR external IP
public static GetExternalIp ( ) : string
Результат string

GetLocalIp() публичный статический Метод

Get local IP address of system (Assumes only one address present... or gives the first valid address if mmultiple)
public static GetLocalIp ( ) : string
Результат string

GetMaxMaturity() публичный статический Метод

public static GetMaxMaturity ( int Maturity ) : string
Maturity int
Результат string

GetNextWeekday() публичный статический Метод

public static GetNextWeekday ( System.DateTime start, DayOfWeek day ) : System.DateTime
start System.DateTime
day DayOfWeek
Результат System.DateTime

GetRegionMaturity() публичный статический Метод

public static GetRegionMaturity ( int Maturity ) : string
Maturity int
Результат string

GetServerReleaseNotesURL() публичный статический Метод

Get the URL to the release notes for the current version of Universe
public static GetServerReleaseNotesURL ( ) : string
Результат string

IsSystemUser() публичный статический Метод

Determines whether the specified userID is a system user.
public static IsSystemUser ( OpenMetaverse userID ) : bool
userID OpenMetaverse User I.
Результат bool

IsValidEmail() публичный статический Метод

Determines whether a string is a valid email address.
public static IsValidEmail ( string address ) : bool
address string Address.
Результат bool

ReadExternalWebsite() публичный статический Метод

Read a website into a string
public static ReadExternalWebsite ( string URL ) : string
URL string URL to change into a string
Результат string

SetEncryptIterations() публичный статический Метод

This is for encryption, it sets the number of times to iterate through the encryption
public static SetEncryptIterations ( int iterations ) : void
iterations int
Результат void

SetEncryptorType() публичный статический Метод

public static SetEncryptorType ( string type ) : void
type string
Результат void

SetKeySize() публичный статический Метод

This is for encryption, it sets the size of the key
public static SetKeySize ( int size ) : void
size int
Результат void

TransactionTypeInfo() публичный статический Метод

public static TransactionTypeInfo ( TransactionType transType ) : string
transType TransactionType
Результат string

UniverseServerVersion() публичный статический Метод

What is our version?
public static UniverseServerVersion ( ) : string
Результат string

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

HostName публичное статическое свойство

public static string HostName
Результат string

RegionNames публичное статическое свойство

public static string[] RegionNames
Результат string[]

UserNames публичное статическое свойство

public static string[] UserNames
Результат string[]