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