Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ObjectCache.cs
- DbSetClause.cs
- PropertyGridDesigner.cs
- TakeQueryOptionExpression.cs
- ParamArrayAttribute.cs
- SqlColumnizer.cs
- RecommendedAsConfigurableAttribute.cs
- QueryContinueDragEventArgs.cs
- PKCS1MaskGenerationMethod.cs
- FileVersion.cs
- UseLicense.cs
- Collection.cs
- AutomationEventArgs.cs
- XmlSchemaInferenceException.cs
- EventProviderWriter.cs
- wgx_commands.cs
- SqlConnectionPoolGroupProviderInfo.cs
- DoubleLinkListEnumerator.cs
- CLSCompliantAttribute.cs
- returneventsaver.cs
- ProfileParameter.cs
- HttpCacheVaryByContentEncodings.cs
- AlternateViewCollection.cs
- SelectedPathEditor.cs
- WeakReferenceList.cs
- XD.cs
- ArrayList.cs
- RsaKeyIdentifierClause.cs
- OleCmdHelper.cs
- FastPropertyAccessor.cs
- EventLogPermissionEntry.cs
- FrameworkContentElementAutomationPeer.cs
- Expression.cs
- PrimitiveSchema.cs
- httpstaticobjectscollection.cs
- HtmlUtf8RawTextWriter.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- UrlMappingsModule.cs
- HashAlgorithm.cs
- SimpleExpression.cs
- PeerTransportSecurityElement.cs
- MemberMaps.cs
- RadioButtonRenderer.cs
- _TransmitFileOverlappedAsyncResult.cs
- UpdatePanelTrigger.cs
- ListParagraph.cs
- PageContent.cs
- SqlProfileProvider.cs
- ResourceKey.cs
- TemplatedWizardStep.cs
- FontSourceCollection.cs
- RecognizedWordUnit.cs
- CalendarModeChangedEventArgs.cs
- ExceptionCollection.cs
- TextBreakpoint.cs
- Validator.cs
- SvcMapFileLoader.cs
- WebSysDisplayNameAttribute.cs
- EmptyEnumerator.cs
- WindowsTooltip.cs
- ScrollProperties.cs
- CodeExpressionStatement.cs
- TabControl.cs
- SecurityDocument.cs
- RelationshipWrapper.cs
- FunctionDetailsReader.cs
- ScriptComponentDescriptor.cs
- TrackingProfileCache.cs
- DoubleAnimationUsingKeyFrames.cs
- PhonemeConverter.cs
- DrawingAttributesDefaultValueFactory.cs
- HtmlTableRowCollection.cs
- DCSafeHandle.cs
- GuidTagList.cs
- DataSpaceManager.cs
- BitmapEffectDrawing.cs
- OutputCacheProfile.cs
- TitleStyle.cs
- ObjectSet.cs
- PipeException.cs
- ProfileParameter.cs
- PathGeometry.cs
- ScriptRegistrationManager.cs
- DelegatedStream.cs
- DoubleLinkList.cs
- DataGridViewHeaderCell.cs
- WebPartManagerInternals.cs
- WebPartZoneBase.cs
- ControlPaint.cs
- UnauthorizedAccessException.cs
- RegexTree.cs
- EntityDesignerDataSourceView.cs
- TimerTable.cs
- ObjectHandle.cs
- EntityAdapter.cs
- ApplyImportsAction.cs
- BooleanKeyFrameCollection.cs
- UIElementParagraph.cs
- TemplatePropertyEntry.cs
- TagMapInfo.cs