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
- FillRuleValidation.cs
- SpecialNameAttribute.cs
- MouseActionConverter.cs
- ObjectPersistData.cs
- CultureInfoConverter.cs
- Gdiplus.cs
- GradientStopCollection.cs
- TripleDESCryptoServiceProvider.cs
- EntityDataSourceConfigureObjectContext.cs
- FocusWithinProperty.cs
- coordinatorfactory.cs
- Vars.cs
- ExpandableObjectConverter.cs
- WebPartRestoreVerb.cs
- QueryStringParameter.cs
- CompositeCollectionView.cs
- Part.cs
- GeometryGroup.cs
- CodeChecksumPragma.cs
- QueryCursorEventArgs.cs
- CustomError.cs
- SslStream.cs
- ListView.cs
- OleDbReferenceCollection.cs
- ClientFormsAuthenticationCredentials.cs
- ToolBarTray.cs
- Bezier.cs
- ReflectionUtil.cs
- TreeNodeBindingDepthConverter.cs
- StorageMappingItemCollection.cs
- SoundPlayer.cs
- TdsParserSafeHandles.cs
- ConfigurationStrings.cs
- VerticalAlignConverter.cs
- LogicalExpressionTypeConverter.cs
- Soap.cs
- TaiwanLunisolarCalendar.cs
- KeyEvent.cs
- TextBlock.cs
- MasterPage.cs
- WindowsFormsSynchronizationContext.cs
- ToolStripOverflow.cs
- _SecureChannel.cs
- NoneExcludedImageIndexConverter.cs
- ElapsedEventArgs.cs
- XmlWrappingWriter.cs
- UnsafeNativeMethodsPenimc.cs
- InvokeHandlers.cs
- PeerToPeerException.cs
- PointHitTestParameters.cs
- ContextStaticAttribute.cs
- HostingEnvironment.cs
- NetworkInformationPermission.cs
- SchemaImporterExtension.cs
- TerminatorSinks.cs
- _SafeNetHandles.cs
- SqlClientWrapperSmiStreamChars.cs
- __ComObject.cs
- IpcChannel.cs
- MachineSettingsSection.cs
- XamlSerializerUtil.cs
- FullTextLine.cs
- ListViewSelectEventArgs.cs
- DelayedRegex.cs
- DictionaryBase.cs
- XmlWellformedWriter.cs
- ResourceAttributes.cs
- ProcessInfo.cs
- _TransmitFileOverlappedAsyncResult.cs
- PackUriHelper.cs
- MsmqHostedTransportConfiguration.cs
- LayoutEditorPart.cs
- EntityDataSourceContextDisposingEventArgs.cs
- UrlMappingsSection.cs
- Bezier.cs
- WindowPattern.cs
- PreProcessInputEventArgs.cs
- SiteMapPath.cs
- Fonts.cs
- MouseDevice.cs
- CellTreeNode.cs
- SqlOuterApplyReducer.cs
- EntityDataSourceWizardForm.cs
- Attributes.cs
- ImageIndexConverter.cs
- PrimitiveXmlSerializers.cs
- GradientStop.cs
- IsolatedStorageException.cs
- InstanceBehavior.cs
- SmiGettersStream.cs
- FindCriteriaElement.cs
- DesignTimeParseData.cs
- SafeArrayRankMismatchException.cs
- _SecureChannel.cs
- SafeHandle.cs
- ActivityDesignerAccessibleObject.cs
- ByteStream.cs
- EventLog.cs
- remotingproxy.cs
- Span.cs