Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Threading / DispatcherProcessingDisabled.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleCmdHelper.cs
- UriParserTemplates.cs
- WsatServiceAddress.cs
- Section.cs
- HostUtils.cs
- ArcSegment.cs
- SqlFormatter.cs
- XmlNamespaceMappingCollection.cs
- Base64Stream.cs
- EntryPointNotFoundException.cs
- ViewStateChangedEventArgs.cs
- BuildProviderCollection.cs
- DecoderBestFitFallback.cs
- LoadedOrUnloadedOperation.cs
- NegatedConstant.cs
- NameValueSectionHandler.cs
- ValidationErrorEventArgs.cs
- SessionPageStateSection.cs
- SHA256.cs
- TableStyle.cs
- RoleGroup.cs
- SelectionChangedEventArgs.cs
- CodeGenerator.cs
- ProfileElement.cs
- PropertyPathWorker.cs
- EventMap.cs
- DictionaryEntry.cs
- ComNativeDescriptor.cs
- GatewayIPAddressInformationCollection.cs
- SelectionGlyphBase.cs
- ModuleBuilderData.cs
- XmlWellformedWriter.cs
- ContainerFilterService.cs
- IInstanceTable.cs
- AttachedAnnotationChangedEventArgs.cs
- XamlBrushSerializer.cs
- XomlDesignerLoader.cs
- Expr.cs
- GridViewUpdateEventArgs.cs
- DecimalKeyFrameCollection.cs
- ControlParameter.cs
- SizeKeyFrameCollection.cs
- CompilerErrorCollection.cs
- ScrollViewerAutomationPeer.cs
- LinqDataSourceUpdateEventArgs.cs
- AdornerDecorator.cs
- CanExpandCollapseAllConverter.cs
- AssemblyBuilderData.cs
- ColumnResizeAdorner.cs
- Material.cs
- Popup.cs
- SystemIPv4InterfaceProperties.cs
- DataControlReference.cs
- InvariantComparer.cs
- XPathSingletonIterator.cs
- IndependentAnimationStorage.cs
- Message.cs
- PageParserFilter.cs
- FlowDocumentReaderAutomationPeer.cs
- SkewTransform.cs
- DbParameterCollectionHelper.cs
- Point.cs
- SqlException.cs
- ChangeBlockUndoRecord.cs
- CreateUserErrorEventArgs.cs
- DropShadowEffect.cs
- _ListenerAsyncResult.cs
- VectorAnimation.cs
- _ConnectOverlappedAsyncResult.cs
- GenericRootAutomationPeer.cs
- RtType.cs
- WsatAdminException.cs
- RootBuilder.cs
- IERequestCache.cs
- ContextMenuStripActionList.cs
- MarkupCompiler.cs
- DataTransferEventArgs.cs
- ServiceChannelManager.cs
- SimpleBitVector32.cs
- WebSysDisplayNameAttribute.cs
- ClientTarget.cs
- HttpAsyncResult.cs
- SafeFileMappingHandle.cs
- NetworkInformationException.cs
- TablePattern.cs
- BuildDependencySet.cs
- ColorContext.cs
- SizeConverter.cs
- FtpWebResponse.cs
- SmuggledIUnknown.cs
- TextRange.cs
- Version.cs
- Nullable.cs
- ControlCollection.cs
- DecimalAverageAggregationOperator.cs
- DataTemplateSelector.cs
- ButtonRenderer.cs
- OutputCacheSection.cs
- WindowsPrincipal.cs
- ModelUIElement3D.cs