Code:
/ 4.0 / 4.0 / 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. 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
- BinaryObjectWriter.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- SchemaTypeEmitter.cs
- Dynamic.cs
- ConfigXmlComment.cs
- StylusDownEventArgs.cs
- DbExpressionVisitor.cs
- BitmapFrameEncode.cs
- GlyphRunDrawing.cs
- PropertyKey.cs
- CodeIdentifier.cs
- SessionEndingCancelEventArgs.cs
- SettingsSection.cs
- ProjectionCamera.cs
- SessionEndedEventArgs.cs
- LongSumAggregationOperator.cs
- categoryentry.cs
- UidManager.cs
- TypedTableBaseExtensions.cs
- SoundPlayer.cs
- ConnectionStringsExpressionBuilder.cs
- BatchParser.cs
- MatrixCamera.cs
- TailCallAnalyzer.cs
- DateTimeFormatInfo.cs
- MergeFailedEvent.cs
- Permission.cs
- StylusPointDescription.cs
- Keyboard.cs
- XmlChildNodes.cs
- HTMLTagNameToTypeMapper.cs
- BaseTemplateBuildProvider.cs
- SwitchAttribute.cs
- TextParaClient.cs
- ToolStripPanelDesigner.cs
- EpmTargetPathSegment.cs
- Schema.cs
- QilLiteral.cs
- CacheRequest.cs
- MemoryFailPoint.cs
- ToolStripDropDownButton.cs
- UniqueConstraint.cs
- TypeValidationEventArgs.cs
- ItemAutomationPeer.cs
- DrawingImage.cs
- Domain.cs
- Geometry3D.cs
- ErrorRuntimeConfig.cs
- SequentialOutput.cs
- PrintControllerWithStatusDialog.cs
- Panel.cs
- HiddenFieldDesigner.cs
- AdRotatorDesigner.cs
- ActiveDocumentEvent.cs
- GeometryModel3D.cs
- WebReferencesBuildProvider.cs
- Event.cs
- ContractMapping.cs
- ColorConverter.cs
- FacetChecker.cs
- SimpleType.cs
- ApplicationHost.cs
- LoginView.cs
- XmlWrappingReader.cs
- InputBindingCollection.cs
- XpsFilter.cs
- BamlCollectionHolder.cs
- TextServicesCompartment.cs
- SoapObjectWriter.cs
- HttpFormatExtensions.cs
- DeclarationUpdate.cs
- _CommandStream.cs
- OleDbWrapper.cs
- BehaviorEditorPart.cs
- CompareValidator.cs
- EndpointAddressAugust2004.cs
- DockingAttribute.cs
- RelationshipType.cs
- DllNotFoundException.cs
- ApplicationContext.cs
- OuterGlowBitmapEffect.cs
- MimeImporter.cs
- _AuthenticationState.cs
- InternalPermissions.cs
- ArrayWithOffset.cs
- NativeActivityTransactionContext.cs
- CircleHotSpot.cs
- TableChangeProcessor.cs
- DecoderExceptionFallback.cs
- UpdatePanelControlTrigger.cs
- HttpPostClientProtocol.cs
- IList.cs
- ButtonColumn.cs
- TypedReference.cs
- ContainerParagraph.cs
- TrackingRecord.cs
- SerializableAttribute.cs
- ByteFacetDescriptionElement.cs
- LinqDataSourceStatusEventArgs.cs
- SelectionListComponentEditor.cs