Class InMemoryEditorSessionStateStore
Serenity.Global.Infrastructure.Editor.IEditorSessionStateStore that lives in a test's own memory. Every test that exercises code
reading or writing editor session scratch builds one of these, so no test can reach — let alone wipe — the
real editor session the author is working in. Share one instance between two objects to model the
session surviving a domain reload.
Inheritance
InMemoryEditorSessionStateStore
Implements
IEditorSessionStateStore
Assembly: Serenity.Tests.Shared.Editor.dll
Syntax
public sealed class InMemoryEditorSessionStateStore : IEditorSessionStateStore
Constructors
InMemoryEditorSessionStateStore()
Declaration
public InMemoryEditorSessionStateStore()
Properties
StoredValueCount
How many values of every type are stored — zero once everything was erased.
Declaration
public int StoredValueCount { get; }
Property Value
Methods
ContainsString(string)
Whether a string is stored at key.
Declaration
public bool ContainsString(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
EraseBool(string)
Declaration
public void EraseBool(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
EraseInt(string)
Declaration
public void EraseInt(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
EraseString(string)
Declaration
public void EraseString(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
GetBool(string, bool)
Declaration
public bool GetBool(string key, bool defaultValue)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| bool |
defaultValue |
|
Returns
GetInt(string, int)
Declaration
public int GetInt(string key, int defaultValue)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| int |
defaultValue |
|
Returns
GetString(string, string)
Declaration
public string GetString(string key, string defaultValue)
Parameters
Returns
SetBool(string, bool)
Declaration
public void SetBool(string key, bool value)
Parameters
SetInt(string, int)
Declaration
public void SetInt(string key, int value)
Parameters
SetString(string, string)
Declaration
public void SetString(string key, string value)
Parameters
Implements
Serenity.Global.Infrastructure.Editor.IEditorSessionStateStore