IStateStore.GetOrNew<T> Method |
Gets a value from the cache or adds a default value if it does not exist yet.
Namespace: PostSharp.Extensibility
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
T GetOrNew<T>() where T : new()
Type Parameters
- T
- Type of value.
Return Value
Type: TEither the value of type T present in the cache, either a new object of type T.