4 instantiations of DispenserAlgorithm
System.Private.CoreLib (4)
System\Reflection\Runtime\Dispensers\DispenserAlgorithm.cs (4)
14
public static readonly DispenserAlgorithm CreateAlways = new
DispenserAlgorithm
(); // Always create a new object (i.e. no caching at all.)
15
public static readonly DispenserAlgorithm ReuseAlways = new
DispenserAlgorithm
(); // Every object is saved permanently (i.e. complete unification.)
16
public static readonly DispenserAlgorithm ReuseAsLongAsValueIsAlive = new
DispenserAlgorithm
(); // Every object is saved using weak references.
24
public static readonly DispenserAlgorithm ReuseAsLongAsKeyIsAlive = new
DispenserAlgorithm
();
18 references to DispenserAlgorithm
System.Private.CoreLib (18)
System\Reflection\Runtime\Dispensers\DefaultDispenserPolicy.cs (6)
14
public sealed override
DispenserAlgorithm
GetAlgorithm(DispenserScenario scenario)
20
return
DispenserAlgorithm
.ReuseAsLongAsValueIsAlive;
24
return
DispenserAlgorithm
.ReuseAsLongAsValueIsAlive;
28
return
DispenserAlgorithm
.ReuseAlways;
32
return
DispenserAlgorithm
.ReuseAlways; // Match policy used for runtime Assembly instances in other runtime flavors.
35
return
DispenserAlgorithm
.CreateAlways;
System\Reflection\Runtime\Dispensers\DispenserAlgorithm.cs (4)
14
public static readonly
DispenserAlgorithm
CreateAlways = new DispenserAlgorithm(); // Always create a new object (i.e. no caching at all.)
15
public static readonly
DispenserAlgorithm
ReuseAlways = new DispenserAlgorithm(); // Every object is saved permanently (i.e. complete unification.)
16
public static readonly
DispenserAlgorithm
ReuseAsLongAsValueIsAlive = new DispenserAlgorithm(); // Every object is saved using weak references.
24
public static readonly
DispenserAlgorithm
ReuseAsLongAsKeyIsAlive = new DispenserAlgorithm();
System\Reflection\Runtime\Dispensers\DispenserFactory.cs (7)
23
DispenserAlgorithm
algorithm = s_dispenserPolicy.GetAlgorithm(scenario);
24
if (algorithm ==
DispenserAlgorithm
.ReuseAsLongAsKeyIsAlive)
41
DispenserAlgorithm
algorithm = s_dispenserPolicy.GetAlgorithm(scenario);
43
Debug.Assert(algorithm !=
DispenserAlgorithm
.ReuseAsLongAsKeyIsAlive,
46
if (algorithm ==
DispenserAlgorithm
.CreateAlways)
48
else if (algorithm ==
DispenserAlgorithm
.ReuseAlways)
50
else if (algorithm ==
DispenserAlgorithm
.ReuseAsLongAsValueIsAlive)
System\Reflection\Runtime\Dispensers\DispenserPolicy.cs (1)
14
public abstract
DispenserAlgorithm
GetAlgorithm(DispenserScenario scenario);