SimpleStaticLazyStack<TStack, TValue> Class

Summary

A InspectorGadgets.DisposableStaticLazyStack`1 that gets and stores a particular TValue, sets it to a different value, and then reverts it to the previous value when disposed.
graph BT Type-->Base0["DisposableStaticLazyStack<TStack>"] Base0-->Base1["StaticLazyStack<TStack>"] Base1-->Base2["Object"] Type-.->Interface0["IDisposable"] Type["SimpleStaticLazyStack<TStack, TValue>"] class Type type-node

Syntax

public abstract class SimpleStaticLazyStack<TStack, TValue> : DisposableStaticLazyStack<TStack>, 
    IDisposable
    where TStack : SimpleStaticLazyStack<TStack, TValue>, new()

Type Parameters

Name Description
TStack
TValue

Properties

Name Value Summary
CurrentValue TValue
The TValue being controlled by this stack.
PreviousValue TValue
The InspectorGadgets.SimpleStaticLazyStack`2.CurrentValue from before this stack element was activated.

Methods

Name Value Summary
Dispose() void
Calls InspectorGadgets.StaticLazyStack`1.Decrement and reverts the InspectorGadgets.SimpleStaticLazyStack`2.CurrentValue to the InspectorGadgets.SimpleStaticLazyStack`2.PreviousValue.
Get(TValue) TStack
Increments the stack, sets the InspectorGadgets.SimpleStaticLazyStack`2.CurrentValue, and returns the top element of the stack.
static
OnIncrement() void
Called by InspectorGadgets.StaticLazyStack`1.Increment. Stores the InspectorGadgets.SimpleStaticLazyStack`2.CurrentValue in InspectorGadgets.SimpleStaticLazyStack`2.PreviousValue.