Class AppDemo
Helper class for handling demo account state.
Inherited Members
Namespace: EduCATS.Demo
Assembly: EduCATS.dll
Syntax
public class AppDemo
Fields
Instance
Shared instance of AppDemo
.
Declaration
public static AppDemo Instance
Field Value
Type | Description |
---|---|
AppDemo |
Properties
IsDemoAccount
Property for checking whether is account demo or not.
Declaration
public bool IsDemoAccount { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
CheckDemoAccount(string, string)
Check if account is demo or not.
Declaration
public bool CheckDemoAccount(string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | username | Username. |
string | password | Password. |
Returns
Type | Description |
---|---|
bool | Demo account or not. |
GetDemoResponse(AppDemoType)
Get demo response string and status code.
Declaration
public KeyValuePair<string, HttpStatusCode> GetDemoResponse(AppDemoType type)
Parameters
Type | Name | Description |
---|---|---|
AppDemoType | type | Demo resource type to retrieve. |
Returns
Type | Description |
---|---|
KeyValuePair<string, HttpStatusCode> | Demo response string and status code. |
GetInvalidResponse()
Generate invalid response with BadRequest
status code.
Declaration
public KeyValuePair<string, HttpStatusCode> GetInvalidResponse()
Returns
Type | Description |
---|---|
KeyValuePair<string, HttpStatusCode> | Invalid response with empty string and |