28 references to LazyThreadSafetyMode
mscorlib (26)
system\Lazy.cs (26)
125
: this(
LazyThreadSafetyMode
.ExecutionAndPublication)
143
: this(valueFactory,
LazyThreadSafetyMode
.ExecutionAndPublication)
154
this(isThreadSafe?
LazyThreadSafetyMode
.ExecutionAndPublication :
LazyThreadSafetyMode
.None)
164
public Lazy(
LazyThreadSafetyMode
mode)
182
: this(valueFactory, isThreadSafe ?
LazyThreadSafetyMode
.ExecutionAndPublication :
LazyThreadSafetyMode
.None)
197
public Lazy(Func<T> valueFactory,
LazyThreadSafetyMode
mode)
209
private static object GetObjectFromMode(
LazyThreadSafetyMode
mode)
211
if (mode ==
LazyThreadSafetyMode
.ExecutionAndPublication)
213
else if (mode ==
LazyThreadSafetyMode
.PublicationOnly)
215
else if (mode !=
LazyThreadSafetyMode
.None)
257
internal
LazyThreadSafetyMode
Mode
261
if (m_threadSafeObj == null) return
LazyThreadSafetyMode
.None;
262
if (m_threadSafeObj == (object)LazyHelpers.PUBLICATION_ONLY_SENTINEL) return
LazyThreadSafetyMode
.PublicationOnly;
263
return
LazyThreadSafetyMode
.ExecutionAndPublication;
310
/// Please <see cref="System.Threading.
LazyThreadSafetyMode
"> for more information on how <see cref="T:System.Threading.Lazy{T}"/> will behave if an exception is thrown
351
LazyThreadSafetyMode
mode = Mode;
352
if (mode ==
LazyThreadSafetyMode
.None)
357
else if (mode ==
LazyThreadSafetyMode
.PublicationOnly)
418
LazyThreadSafetyMode
mode = Mode;
424
if (mode !=
LazyThreadSafetyMode
.PublicationOnly && m_valueFactory == ALREADY_INVOKED_SENTINEL)
428
if (mode !=
LazyThreadSafetyMode
.PublicationOnly) // only detect recursion on None and ExecutionAndPublication modes
441
if (mode !=
LazyThreadSafetyMode
.PublicationOnly) // don't cache the exception for PublicationOnly mode
456
if (mode !=
LazyThreadSafetyMode
.PublicationOnly) // don't cache the exception for PublicationOnly mode
495
public
LazyThreadSafetyMode
Mode
System.Core (1)
System\Lazy.cs (1)
11
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.
LazyThreadSafetyMode
))]
System.ServiceModel (1)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
187
this.webSocketSoapContentType = new Lazy<string>(() => { return this.MessageEncoderFactory.CreateSessionEncoder().ContentType; },
LazyThreadSafetyMode
.ExecutionAndPublication);