using System.Collections.Concurrent;
static ConcurrentDictionary<OidcScopes, object> _dictionary = new ConcurrentDictionary<OidcScopes, object> ();
public static void Main (string[] args)
for (int i = 0; i < 8; i++)
var x = GetOrAdd (OidcScopes.PwdiRead);
static object GetOrAdd (OidcScopes scope)
return _dictionary.GetOrAdd (scope, scopes => Create(scopes));
private static object Create (OidcScopes scope)
Console.WriteLine (scope);