logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    InMemoryEditorSessionStateStore
    Implements
    IEditorSessionStateStore
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Tests.Shared.Editor
    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
    Type Description
    int

    Methods

    ContainsString(string)

    Whether a string is stored at key.

    Declaration
    public bool ContainsString(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool

    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
    Type Description
    bool

    GetInt(string, int)

    Declaration
    public int GetInt(string key, int defaultValue)
    Parameters
    Type Name Description
    string key
    int defaultValue
    Returns
    Type Description
    int

    GetString(string, string)

    Declaration
    public string GetString(string key, string defaultValue)
    Parameters
    Type Name Description
    string key
    string defaultValue
    Returns
    Type Description
    string

    SetBool(string, bool)

    Declaration
    public void SetBool(string key, bool value)
    Parameters
    Type Name Description
    string key
    bool value

    SetInt(string, int)

    Declaration
    public void SetInt(string key, int value)
    Parameters
    Type Name Description
    string key
    int value

    SetString(string, string)

    Declaration
    public void SetString(string key, string value)
    Parameters
    Type Name Description
    string key
    string value

    Implements

    Serenity.Global.Infrastructure.Editor.IEditorSessionStateStore
    In this article
    © 2026 Serenity. All Rights Reserved