28 references to LazyThreadSafetyMode
mscorlib (26)
system\Lazy.cs (26)
125: this(LazyThreadSafetyMode.ExecutionAndPublication) 143: this(valueFactory, LazyThreadSafetyMode.ExecutionAndPublication) 154this(isThreadSafe? LazyThreadSafetyMode.ExecutionAndPublication : LazyThreadSafetyMode.None) 164public Lazy(LazyThreadSafetyMode mode) 182: this(valueFactory, isThreadSafe ? LazyThreadSafetyMode.ExecutionAndPublication : LazyThreadSafetyMode.None) 197public Lazy(Func<T> valueFactory, LazyThreadSafetyMode mode) 209private static object GetObjectFromMode(LazyThreadSafetyMode mode) 211if (mode == LazyThreadSafetyMode.ExecutionAndPublication) 213else if (mode == LazyThreadSafetyMode.PublicationOnly) 215else if (mode != LazyThreadSafetyMode.None) 257internal LazyThreadSafetyMode Mode 261if (m_threadSafeObj == null) return LazyThreadSafetyMode.None; 262if (m_threadSafeObj == (object)LazyHelpers.PUBLICATION_ONLY_SENTINEL) return LazyThreadSafetyMode.PublicationOnly; 263return 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 351LazyThreadSafetyMode mode = Mode; 352if (mode == LazyThreadSafetyMode.None) 357else if (mode == LazyThreadSafetyMode.PublicationOnly) 418LazyThreadSafetyMode mode = Mode; 424if (mode != LazyThreadSafetyMode.PublicationOnly && m_valueFactory == ALREADY_INVOKED_SENTINEL) 428if (mode != LazyThreadSafetyMode.PublicationOnly) // only detect recursion on None and ExecutionAndPublication modes 441if (mode != LazyThreadSafetyMode.PublicationOnly) // don't cache the exception for PublicationOnly mode 456if (mode != LazyThreadSafetyMode.PublicationOnly) // don't cache the exception for PublicationOnly mode 495public 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)
187this.webSocketSoapContentType = new Lazy<string>(() => { return this.MessageEncoderFactory.CreateSessionEncoder().ContentType; }, LazyThreadSafetyMode.ExecutionAndPublication);