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
- Constant.cs
- Focus.cs
- WebAdminConfigurationHelper.cs
- EdmEntityTypeAttribute.cs
- AdRotatorDesigner.cs
- OrderingInfo.cs
- HtmlInputReset.cs
- SourceFileInfo.cs
- RIPEMD160.cs
- FlowNode.cs
- ToolBarTray.cs
- FormsAuthenticationUserCollection.cs
- HtmlToClrEventProxy.cs
- XmlAnyAttributeAttribute.cs
- ImageFormatConverter.cs
- TreeViewImageIndexConverter.cs
- KerberosTicketHashIdentifierClause.cs
- TextLine.cs
- StreamedWorkflowDefinitionContext.cs
- PassportAuthentication.cs
- UnsafeNativeMethods.cs
- ItemMap.cs
- TypeDescriptorContext.cs
- InvalidateEvent.cs
- Substitution.cs
- ButtonField.cs
- XmlNodeReader.cs
- DesignerDataRelationship.cs
- SafeReversePInvokeHandle.cs
- CompilationRelaxations.cs
- Pair.cs
- HorizontalAlignConverter.cs
- PackagePartCollection.cs
- IgnorePropertiesAttribute.cs
- ColumnHeaderCollectionEditor.cs
- DateTimeSerializationSection.cs
- ContentPresenter.cs
- PlainXmlDeserializer.cs
- XmlAnyElementAttributes.cs
- dtdvalidator.cs
- SqlServer2KCompatibilityAnnotation.cs
- ToolStripDropDown.cs
- NetMsmqSecurityElement.cs
- IpcManager.cs
- DurationConverter.cs
- ChtmlTextWriter.cs
- AssertSection.cs
- SqlFunctionAttribute.cs
- ObjectFullSpanRewriter.cs
- ListViewInsertEventArgs.cs
- QilIterator.cs
- DynamicResourceExtension.cs
- StreamReader.cs
- ProxyElement.cs
- StackBuilderSink.cs
- ServiceNameCollection.cs
- DropShadowEffect.cs
- EventLogReader.cs
- connectionpool.cs
- ArrayMergeHelper.cs
- SystemFonts.cs
- UdpConstants.cs
- OutputCacheSettingsSection.cs
- X509CertificateValidator.cs
- ContainerControlDesigner.cs
- GridViewUpdatedEventArgs.cs
- ScaleTransform3D.cs
- BoundingRectTracker.cs
- AlternateView.cs
- DesignBindingPicker.cs
- SID.cs
- CommandBinding.cs
- TemplateKey.cs
- RootDesignerSerializerAttribute.cs
- SendKeys.cs
- MenuBase.cs
- TextLine.cs
- ElapsedEventArgs.cs
- EncoderParameters.cs
- TransactionFlowBindingElementImporter.cs
- ValidationSummary.cs
- MessageSecurityOverMsmqElement.cs
- MemoryResponseElement.cs
- MenuCommand.cs
- HtmlTableRow.cs
- PropertyCollection.cs
- HttpApplicationFactory.cs
- XmlElementAttributes.cs
- MenuItem.cs
- CodeRemoveEventStatement.cs
- WebConfigurationManager.cs
- DesignerActionList.cs
- ParsedAttributeCollection.cs
- COM2Properties.cs
- DataBoundControlHelper.cs
- FixedFindEngine.cs
- FilterableAttribute.cs
- TracingConnectionInitiator.cs
- ThousandthOfEmRealPoints.cs
- WindowsAuthenticationEventArgs.cs