예제 #1
0
 public static TValue GetOrAdd <TValue>(this IStatefulStorage storage, Func <TValue> valueFactory)
 {
     return(storage.GetOrAdd <TValue>(name: null, valueFactory: valueFactory));
 }
 Stopwatch GetStopwatch(string name)
 {
     return(storage.GetOrAdd <Stopwatch>(name, () => new Stopwatch()));
 }