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
- GenericUriParser.cs
- TableLayoutStyle.cs
- BufferedGraphicsManager.cs
- DataReceivedEventArgs.cs
- SmiConnection.cs
- CssClassPropertyAttribute.cs
- IxmlLineInfo.cs
- PrePostDescendentsWalker.cs
- Classification.cs
- relpropertyhelper.cs
- AccessText.cs
- VisualStyleElement.cs
- XPathDocumentIterator.cs
- AssemblyCache.cs
- DataTableMapping.cs
- XmlTypeMapping.cs
- DataContract.cs
- ListItem.cs
- RootAction.cs
- ADConnectionHelper.cs
- connectionpool.cs
- DataViewSettingCollection.cs
- DataControlFieldHeaderCell.cs
- __ComObject.cs
- CompileLiteralTextParser.cs
- CallbackTimeoutsBehavior.cs
- TableLayoutPanelCellPosition.cs
- TemplatedControlDesigner.cs
- StringWriter.cs
- SecurityState.cs
- XmlSerializableServices.cs
- SqlFlattener.cs
- DateTimeAutomationPeer.cs
- Errors.cs
- XmlComment.cs
- DbDataRecord.cs
- TargetPerspective.cs
- WebPartsSection.cs
- AsymmetricKeyExchangeFormatter.cs
- SqlNode.cs
- DescendantQuery.cs
- TraceUtils.cs
- WebBrowserHelper.cs
- EntityDataSourceDataSelection.cs
- IisTraceWebEventProvider.cs
- GridViewSelectEventArgs.cs
- HtmlAnchor.cs
- RectConverter.cs
- TogglePattern.cs
- PersonalizationAdministration.cs
- NamedPermissionSet.cs
- MenuEventArgs.cs
- CombinedGeometry.cs
- GenerateTemporaryTargetAssembly.cs
- ConfigurationErrorsException.cs
- CqlGenerator.cs
- TimeEnumHelper.cs
- MailMessageEventArgs.cs
- RootAction.cs
- BuilderElements.cs
- SystemTcpStatistics.cs
- XmlAnyElementAttribute.cs
- AbandonedMutexException.cs
- DataServiceConfiguration.cs
- UserPersonalizationStateInfo.cs
- SelectionPattern.cs
- GeneralTransform3DTo2D.cs
- WebConfigurationFileMap.cs
- ConfigurationManagerHelperFactory.cs
- MessageBox.cs
- ObjectViewListener.cs
- DSASignatureDeformatter.cs
- ForEachAction.cs
- documentation.cs
- BaseServiceProvider.cs
- ImportCatalogPart.cs
- QuaternionAnimation.cs
- NamespaceQuery.cs
- PropagatorResult.cs
- ConfigurationElementProperty.cs
- FormViewPageEventArgs.cs
- HtmlShim.cs
- ResolveDuplexAsyncResult.cs
- OpenTypeCommon.cs
- DataGridCell.cs
- Int64Converter.cs
- QueueProcessor.cs
- RegexCompilationInfo.cs
- DbConnectionPoolGroup.cs
- embossbitmapeffect.cs
- ToolStripItemDesigner.cs
- RewritingPass.cs
- CrossAppDomainChannel.cs
- AlternationConverter.cs
- SymLanguageType.cs
- Visitor.cs
- InfiniteTimeSpanConverter.cs
- propertytag.cs
- PeerIPHelper.cs
- AssemblyFilter.cs