C# Класс SaneWeb.Resources.Utility

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

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

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

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

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

Deserializes an object from its JSON representation into a .NET object
public static deserializeJSONToObject ( String json ) : Object
json String JSON String to be deserialized
Результат Object

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

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

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

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

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

Generates a cryptographically secure random integer
public static randomNumber ( ) : int
Результат int

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

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

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

Serializes an object to a JSON string
public static serializeObjectToJSON ( Object obj ) : String
obj Object Object to be serialized
Результат String

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

Builds a cryptographically secure random String of the size maxSize
public static trustedRandomString ( int maxSize ) : string
maxSize int Size of the generated String
Результат string