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
- DescendantOverDescendantQuery.cs
- DBConnection.cs
- DiscardableAttribute.cs
- XD.cs
- BitmapCodecInfoInternal.cs
- DBSchemaTable.cs
- RepeaterItemEventArgs.cs
- PassportAuthentication.cs
- TraceXPathNavigator.cs
- OutputCacheProfile.cs
- Type.cs
- StringFreezingAttribute.cs
- LogicalExpr.cs
- TableLayoutStyle.cs
- ValidationHelper.cs
- OperationFormatUse.cs
- EncodingNLS.cs
- VideoDrawing.cs
- PageCache.cs
- GetWinFXPath.cs
- ColumnClickEvent.cs
- RuntimeConfig.cs
- TreeView.cs
- XmlLoader.cs
- EncodingNLS.cs
- CodeAttributeDeclaration.cs
- ViewStateModeByIdAttribute.cs
- HMACRIPEMD160.cs
- SecUtil.cs
- CheckBoxField.cs
- _NegoState.cs
- CounterSampleCalculator.cs
- XmlLoader.cs
- Size.cs
- SelectionService.cs
- FontWeight.cs
- XmlNamespaceManager.cs
- ArrangedElementCollection.cs
- XmlSchemaGroup.cs
- Parser.cs
- StickyNoteContentControl.cs
- HMACMD5.cs
- Visitor.cs
- WinInet.cs
- NativeRecognizer.cs
- TextParagraphCache.cs
- OutputCacheSettings.cs
- AuthenticationServiceManager.cs
- TextEffectCollection.cs
- EqualityComparer.cs
- TextDecorationCollection.cs
- MailBnfHelper.cs
- X509CertificateValidator.cs
- ActiveXContainer.cs
- StringSource.cs
- ClientRolePrincipal.cs
- DataSetUtil.cs
- MaskDesignerDialog.cs
- VarInfo.cs
- DeclarationUpdate.cs
- WebPartConnectionsConfigureVerb.cs
- CreateRefExpr.cs
- Char.cs
- ModifyActivitiesPropertyDescriptor.cs
- SystemIPInterfaceStatistics.cs
- XmlReaderSettings.cs
- XmlSchemaNotation.cs
- DispatcherHookEventArgs.cs
- ErrorHandlingReceiver.cs
- DataGridViewCellValueEventArgs.cs
- OleDbDataReader.cs
- ListBoxItemAutomationPeer.cs
- OutOfProcStateClientManager.cs
- SearchForVirtualItemEventArgs.cs
- TypeValidationEventArgs.cs
- PathGeometry.cs
- ClipboardData.cs
- HtmlInputSubmit.cs
- IntegerValidator.cs
- WSTransactionSection.cs
- SchemaTableColumn.cs
- XDeferredAxisSource.cs
- ReturnType.cs
- PolyBezierSegment.cs
- WebPartConnection.cs
- QueryStringConverter.cs
- SmtpNegotiateAuthenticationModule.cs
- Win32Exception.cs
- QuaternionValueSerializer.cs
- ElementNotEnabledException.cs
- DataTrigger.cs
- GetPageCompletedEventArgs.cs
- SecurityMessageProperty.cs
- Lazy.cs
- Int32EqualityComparer.cs
- DbLambda.cs
- WebPartRestoreVerb.cs
- ConfigurationProperty.cs
- GB18030Encoding.cs
- _NetworkingPerfCounters.cs