24 references to GetValue
Microsoft.AspNetCore.Razor.Utilities.Shared (2)
Threading\LazyValue`2.cs (2)
54
/// The factory function will be called at most once, when <see cref="
GetValue
(TArg)"/> is first called.
55
/// If multiple threads call <see cref="
GetValue
(TArg)"/> concurrently, only one thread will execute
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (19)
Threading\LazyValueTests.cs (19)
194
var result1 = lazy.
GetValue
("input");
195
var result2 = lazy.
GetValue
("different-input"); // Should ignore this arg
196
var result3 = lazy.
GetValue
("another-input"); // Should ignore this arg too
218
var result = lazy.
GetValue
(inputArg);
231
var result = lazy.
GetValue
(5);
244
var result = lazy.
GetValue
(null);
257
var result = lazy.
GetValue
("test");
271
var exception = Assert.Throws<ArgumentException>(() => lazy.
GetValue
("test"));
292
Assert.Throws<InvalidOperationException>(() => lazy.
GetValue
("test"));
295
var result = lazy.
GetValue
("test");
324
var result = lazy.
GetValue
($"input-{threadIndex}");
359
Assert.Throws<InvalidOperationException>(() => lazy.
GetValue
(100));
362
var result = lazy.
GetValue
(200);
379
var result1 = lazy.
GetValue
("first");
380
var result2 = lazy.
GetValue
("second");
381
var result3 = lazy.
GetValue
("third");
415
allResults.Add(lazy.
GetValue
(threadIndex + j));
455
var result = lazy.
GetValue
(complexArg);
484
var result = lazy.
GetValue
(42);
Microsoft.CodeAnalysis.Razor.Compiler (3)
Language\TagHelperBinding.cs (1)
43
public TagHelperCollection TagHelpers => _lazyTagHelpers.
GetValue
(AllBoundRules);
Language\TagHelperCollection.SegmentCollectionBase.cs (2)
64
return _lazyLookupTable.
GetValue
(this);
69
=> _lazyChecksum.
GetValue
(this);