C# Class SaneWeb.Resources.Utility

Afficher le fichier Open project: ext0/SaneWeb

Méthodes publiques

Méthode Description
deserializeJSONToObject ( String json ) : Object

Deserializes an object from its JSON representation into a .NET object

fetchForClient ( Assembly assembly, String resourceName ) : byte[]

Gets data from an embedded resource in its binary representation

fetchFromResource ( Assembly assembly, String resourceName ) : String

Gets data from an embedded resource in its String representation

randomNumber ( ) : int

Generates a cryptographically secure random integer

randomNumber ( int minValue, int maxValue ) : int

Generates a random integer within a specified range

serializeObjectToJSON ( Object obj ) : String

Serializes an object to a JSON string

trustedRandomString ( int maxSize ) : string

Builds a cryptographically secure random String of the size maxSize

Method Details

deserializeJSONToObject() public static méthode

Deserializes an object from its JSON representation into a .NET object
public static deserializeJSONToObject ( String json ) : Object
json String JSON String to be deserialized
Résultat Object

fetchForClient() public static méthode

Gets data from an embedded resource in its binary representation
public static fetchForClient ( Assembly assembly, String resourceName ) : byte[]
assembly System.Reflection.Assembly Assembly to search in
resourceName String Full name of the resource
Résultat byte[]

fetchFromResource() public static méthode

Gets data from an embedded resource in its String representation
public static fetchFromResource ( Assembly assembly, String resourceName ) : String
assembly System.Reflection.Assembly Assembly to search in
resourceName String Full name of the resource
Résultat String

randomNumber() public static méthode

Generates a cryptographically secure random integer
public static randomNumber ( ) : int
Résultat int

randomNumber() public static méthode

Generates a random integer within a specified range
public static randomNumber ( int minValue, int maxValue ) : int
minValue int Inclusive minimum value of the requested integer
maxValue int Inclusive maximum value of the requested integer
Résultat int

serializeObjectToJSON() public static méthode

Serializes an object to a JSON string
public static serializeObjectToJSON ( Object obj ) : String
obj Object Object to be serialized
Résultat String

trustedRandomString() public static méthode

Builds a cryptographically secure random String of the size maxSize
public static trustedRandomString ( int maxSize ) : string
maxSize int Size of the generated String
Résultat string