C# Class PlaygroundKeeper.Utils

显示文件 Open project: Starcounter/PlaygroundKeeper

Public Methods

Method Description
CallBack ( System.Action callback ) : void
CallBack ( Action callback, ErrorResponse errorResponse ) : void
CallBack ( Action callback, Exception exception ) : void
CallBack ( double>.Action callback, string text, double value ) : void
ErrorResponsToString ( ErrorResponse errorResponse ) : string

GenerateError ( Exception e ) : ErrorResponse

Generate error response

GenerateError ( string message ) : ErrorResponse

Generate error response

IsAdmin ( Simplified.Ring3.SystemUser user ) : bool

Check if user is an admin

ScheduleTaskHelper ( string sessionId, string>.Action action ) : void

Method Details

CallBack() public static method

public static CallBack ( System.Action callback ) : void
callback System.Action
return void

CallBack() public static method

public static CallBack ( Action callback, ErrorResponse errorResponse ) : void
callback Action
errorResponse ErrorResponse
return void

CallBack() public static method

public static CallBack ( Action callback, Exception exception ) : void
callback Action
exception System.Exception
return void

CallBack() public static method

public static CallBack ( double>.Action callback, string text, double value ) : void
callback double>.Action
text string
value double
return void

ErrorResponsToString() public static method

public static ErrorResponsToString ( ErrorResponse errorResponse ) : string
errorResponse ErrorResponse
return string

GenerateError() public static method

Generate error response
public static GenerateError ( Exception e ) : ErrorResponse
e System.Exception Exception
return ErrorResponse

GenerateError() public static method

Generate error response
public static GenerateError ( string message ) : ErrorResponse
message string
return ErrorResponse

IsAdmin() public static method

Check if user is an admin
public static IsAdmin ( Simplified.Ring3.SystemUser user ) : bool
user Simplified.Ring3.SystemUser
return bool

ScheduleTaskHelper() public static method

public static ScheduleTaskHelper ( string sessionId, string>.Action action ) : void
sessionId string
action string>.Action
return void