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
- ProfileSettingsCollection.cs
- InheritedPropertyDescriptor.cs
- LoginView.cs
- OleDbRowUpdatedEvent.cs
- TimelineGroup.cs
- ToggleButton.cs
- CollectionViewSource.cs
- ColorMatrix.cs
- EntryWrittenEventArgs.cs
- PathFigure.cs
- AssociationType.cs
- WebPartHeaderCloseVerb.cs
- DataServiceRequestOfT.cs
- LabelLiteral.cs
- odbcmetadatacollectionnames.cs
- XamlFilter.cs
- ThumbButtonInfo.cs
- WebPartConnectionsConnectVerb.cs
- FlowDocumentPaginator.cs
- RegisteredScript.cs
- _CookieModule.cs
- KeyNotFoundException.cs
- PageContentCollection.cs
- PEFileEvidenceFactory.cs
- WebBrowserProgressChangedEventHandler.cs
- TraceInternal.cs
- WaitHandle.cs
- BufferedMessageData.cs
- FixedSOMContainer.cs
- Constant.cs
- CheckBox.cs
- TextRunCacheImp.cs
- DataReaderContainer.cs
- HighContrastHelper.cs
- SamlSecurityToken.cs
- ColumnHeaderConverter.cs
- RadioButton.cs
- ChameleonKey.cs
- CurrentTimeZone.cs
- CodeNamespaceImportCollection.cs
- Literal.cs
- BStrWrapper.cs
- SettingsBindableAttribute.cs
- ExpressionBuilder.cs
- SettingsSavedEventArgs.cs
- XmlSchemaSimpleTypeRestriction.cs
- DateTimeOffset.cs
- ReaderWriterLock.cs
- RandomNumberGenerator.cs
- DiscardableAttribute.cs
- ProcessModelInfo.cs
- ImplicitInputBrush.cs
- ConstantExpression.cs
- ListViewItemSelectionChangedEvent.cs
- CommonProperties.cs
- FixUp.cs
- SoapSchemaExporter.cs
- ListSortDescription.cs
- ItemCheckedEvent.cs
- ServiceManager.cs
- SettingsContext.cs
- MaterialGroup.cs
- ErrorRuntimeConfig.cs
- HttpConfigurationContext.cs
- HtmlLiteralTextAdapter.cs
- RectAnimationBase.cs
- ViewStateModeByIdAttribute.cs
- DesignTimeParseData.cs
- SoundPlayer.cs
- XhtmlBasicValidatorAdapter.cs
- NonSerializedAttribute.cs
- ObfuscationAttribute.cs
- AsyncCompletedEventArgs.cs
- ContentPlaceHolderDesigner.cs
- RegistryKey.cs
- ArithmeticLiteral.cs
- FrameworkReadOnlyPropertyMetadata.cs
- x509utils.cs
- RangeContentEnumerator.cs
- DelegatingConfigHost.cs
- DecoderBestFitFallback.cs
- ExtentJoinTreeNode.cs
- CodeTypeReferenceExpression.cs
- DoubleAnimationClockResource.cs
- XMLDiffLoader.cs
- OledbConnectionStringbuilder.cs
- PatternMatchRules.cs
- ProfileBuildProvider.cs
- ActivityCodeDomSerializer.cs
- InputReport.cs
- HostProtectionException.cs
- XmlDictionary.cs
- XamlSerializationHelper.cs
- SiteMapNodeItem.cs
- WebDisplayNameAttribute.cs
- HttpResponseBase.cs
- DataGridDesigner.cs
- MasterPageBuildProvider.cs
- PhonemeEventArgs.cs
- PrivilegedConfigurationManager.cs