Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Base / System / Windows / Threading / DispatcherProcessingDisabled.cs / 1 / DispatcherProcessingDisabled.cs
using System; namespace System.Windows.Threading { ////// A structure that allows for dispatcher processing to be /// enabled after a call to Dispatcher.DisableProcessing. /// public struct DispatcherProcessingDisabled : IDisposable { ////// Reenable processing in the dispatcher. /// public void Dispose() { if(_dispatcher != null) { _dispatcher.VerifyAccess(); _dispatcher._disableProcessingCount--; _dispatcher = null; } } ////// Checks whether this object is equal to another /// DispatcherProcessingDisabled object. /// /// /// Object to compare with. /// ////// Returns true when the object is equal to the specified object, /// and false otherwise. /// public override bool Equals(object obj) { if ((null == obj) || !(obj is DispatcherProcessingDisabled)) return false; return (this._dispatcher == ((DispatcherProcessingDisabled)obj)._dispatcher); } ////// Compute hash code for this object. /// ///A 32-bit signed integer hash code. public override int GetHashCode( ) { return base.GetHashCode(); } ////// Compare two DispatcherProcessingDisabled instances for equality. /// /// /// left operand /// /// /// right operand /// ////// Whether or not two operands are equal. /// public static bool operator ==(DispatcherProcessingDisabled left, DispatcherProcessingDisabled right) { return left.Equals(right); } ////// Compare two DispatcherProcessingDisabled instances for inequality. /// /// /// left operand /// /// /// right operand /// ////// Whether or not two operands are equal. /// public static bool operator !=(DispatcherProcessingDisabled left, DispatcherProcessingDisabled right) { return !(left.Equals(right)); } internal Dispatcher _dispatcher; // set by Dispatcher } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; namespace System.Windows.Threading { ////// A structure that allows for dispatcher processing to be /// enabled after a call to Dispatcher.DisableProcessing. /// public struct DispatcherProcessingDisabled : IDisposable { ////// Reenable processing in the dispatcher. /// public void Dispose() { if(_dispatcher != null) { _dispatcher.VerifyAccess(); _dispatcher._disableProcessingCount--; _dispatcher = null; } } ////// Checks whether this object is equal to another /// DispatcherProcessingDisabled object. /// /// /// Object to compare with. /// ////// Returns true when the object is equal to the specified object, /// and false otherwise. /// public override bool Equals(object obj) { if ((null == obj) || !(obj is DispatcherProcessingDisabled)) return false; return (this._dispatcher == ((DispatcherProcessingDisabled)obj)._dispatcher); } ////// Compute hash code for this object. /// ///A 32-bit signed integer hash code. public override int GetHashCode( ) { return base.GetHashCode(); } ////// Compare two DispatcherProcessingDisabled instances for equality. /// /// /// left operand /// /// /// right operand /// ////// Whether or not two operands are equal. /// public static bool operator ==(DispatcherProcessingDisabled left, DispatcherProcessingDisabled right) { return left.Equals(right); } ////// Compare two DispatcherProcessingDisabled instances for inequality. /// /// /// left operand /// /// /// right operand /// ////// Whether or not two operands are equal. /// public static bool operator !=(DispatcherProcessingDisabled left, DispatcherProcessingDisabled right) { return !(left.Equals(right)); } internal Dispatcher _dispatcher; // set by Dispatcher } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataExchangeServiceBinder.cs
- CodeDOMProvider.cs
- XDeferredAxisSource.cs
- ControlParameter.cs
- EventArgs.cs
- DataGridViewTopRowAccessibleObject.cs
- MetadataSerializer.cs
- TaskCanceledException.cs
- BamlStream.cs
- WindowInteropHelper.cs
- ClrPerspective.cs
- ConfigErrorGlyph.cs
- UIPropertyMetadata.cs
- PersonalizationProviderHelper.cs
- XmlDataProvider.cs
- ReachSerializationCacheItems.cs
- GenericTypeParameterBuilder.cs
- MediaContext.cs
- XmlSchemaSimpleContentRestriction.cs
- WindowsGraphicsWrapper.cs
- DataStreams.cs
- MapPathBasedVirtualPathProvider.cs
- ThreadInterruptedException.cs
- Italic.cs
- ImageKeyConverter.cs
- LinkArea.cs
- StorageComplexPropertyMapping.cs
- HostingEnvironmentException.cs
- CroppedBitmap.cs
- AppDomainShutdownMonitor.cs
- DataColumnCollection.cs
- SchemaTableOptionalColumn.cs
- PositiveTimeSpanValidatorAttribute.cs
- GridViewDeletedEventArgs.cs
- SelectionItemProviderWrapper.cs
- Cloud.cs
- InputEventArgs.cs
- HotSpot.cs
- DataSourceCacheDurationConverter.cs
- Automation.cs
- Trace.cs
- IndentedWriter.cs
- SessionParameter.cs
- XmlSchemaType.cs
- ConnectionConsumerAttribute.cs
- PathFigureCollection.cs
- CngAlgorithmGroup.cs
- ContextQuery.cs
- NetCodeGroup.cs
- ProjectionCamera.cs
- webeventbuffer.cs
- CacheSection.cs
- XdrBuilder.cs
- DecimalConverter.cs
- CompiledRegexRunnerFactory.cs
- PlacementWorkspace.cs
- ObjectDataProvider.cs
- SoapProtocolImporter.cs
- DoubleConverter.cs
- BaseCodePageEncoding.cs
- ServicePointManager.cs
- Simplifier.cs
- SqlMethods.cs
- AuthenticationConfig.cs
- MenuBindingsEditor.cs
- DialogResultConverter.cs
- CategoryGridEntry.cs
- ArrayElementGridEntry.cs
- ContentFileHelper.cs
- ChunkedMemoryStream.cs
- TrustLevelCollection.cs
- DataGridClipboardCellContent.cs
- DynamicValueConverter.cs
- DynamicILGenerator.cs
- LinkTarget.cs
- EventRoute.cs
- HtmlTextArea.cs
- ButtonBase.cs
- BamlRecordReader.cs
- Lasso.cs
- SqlMultiplexer.cs
- EditingCommands.cs
- DataGridTextColumn.cs
- xml.cs
- RuntimeConfig.cs
- DbConnectionStringCommon.cs
- SizeIndependentAnimationStorage.cs
- FrugalList.cs
- DataBindingCollectionConverter.cs
- WebSysDefaultValueAttribute.cs
- SapiGrammar.cs
- NativeMethods.cs
- NetStream.cs
- FrameDimension.cs
- HijriCalendar.cs
- XmlSchemaDocumentation.cs
- X500Name.cs
- ServiceMemoryGates.cs
- NativeMethods.cs
- Polyline.cs