C# Class Mr.Shipper.HelperFuncs

Mostrar archivo Open project: Afr0Games/Project-Dollhouse Class Usage Examples

Public Methods

Method Description
CheckCollision ( ulong ID, string>.Dictionary UIEntries ) : bool

Checks for collisions between existing and generated IDs, and prints out if any were found.

Get64BitRandom ( ulong minValue, ulong maxValue ) : ulong
GetFileID ( FAR3Entry Entry ) : uint

Returns a FileID for a rogue file (file that isn't archived).

GetTypeID ( string Filetype ) : uint

Returns the TypeID for a given filetype.

SanitizeFilename ( string Filename ) : string

Sanitize's a file's name so it can be used in an C# enumeration.

ToID ( uint TypeID, uint FileID ) : ulong

Converts a TypeID and FileID to a ulong that can be converted to a hex string for output as XML.

Method Details

CheckCollision() public static method

Checks for collisions between existing and generated IDs, and prints out if any were found.
public static CheckCollision ( ulong ID, string>.Dictionary UIEntries ) : bool
ID ulong
UIEntries string>.Dictionary The entries to check.
return bool

Get64BitRandom() public static method

public static Get64BitRandom ( ulong minValue, ulong maxValue ) : ulong
minValue ulong
maxValue ulong
return ulong

GetFileID() public static method

Returns a FileID for a rogue file (file that isn't archived).
public static GetFileID ( FAR3Entry Entry ) : uint
Entry FAR3Entry The entry generated for the file.
return uint

GetTypeID() public static method

Returns the TypeID for a given filetype.
public static GetTypeID ( string Filetype ) : uint
Filetype string A filetype used by the game.
return uint

SanitizeFilename() public static method

Sanitize's a file's name so it can be used in an C# enumeration.
public static SanitizeFilename ( string Filename ) : string
Filename string The name to sanitize.
return string

ToID() public static method

Converts a TypeID and FileID to a ulong that can be converted to a hex string for output as XML.
public static ToID ( uint TypeID, uint FileID ) : ulong
TypeID uint A TypeID from a FAR3Entry.
FileID uint A FileID from a FAR3Entry.
return ulong