examples/razorwire-mvc/ViewComponents/CounterViewComponent.cs

CounterViewComponent

Type

CounterViewComponent

A view component that manages and displays a global synchronized counter.
Method

Increment()

Atomically increments the component's shared counter by one in a thread-safe manner.
Method

Invoke()

Renders the view for this component using the current counter value as the model.