C# 클래스 SaneWeb.Resources.Utility

파일 보기 프로젝트 열기: ext0/SaneWeb

공개 메소드들

메소드 설명
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