API Browser

Method

GetOrInsert

func GetOrInsert<T>(value: T) -> T

Declaring type: HashSetExtensions<T>
Namespace: System.Collections.Generic
Assembly: Raven.Core.dll
Source file: MutableSetExtensions.rvn

Extension from HashSetExtensions<T>.GetOrInsert

Returns the stored equivalent value, or inserts and returns the candidate.

Parameters

Name Type Description
self HashSet<T>
value T The eagerly evaluated candidate.

Return value

T

The stored equivalent value, preserving its identity, or the candidate.

Remarks

Not atomic or synchronized. Does not replace an equivalent element.