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
- ThousandthOfEmRealPoints.cs
- Section.cs
- TransportConfigurationTypeElement.cs
- OleDbDataAdapter.cs
- Bidi.cs
- GZipStream.cs
- UInt32Storage.cs
- TableColumnCollectionInternal.cs
- WrapperEqualityComparer.cs
- _LocalDataStore.cs
- ListItemConverter.cs
- XamlRtfConverter.cs
- ServiceDescriptionReflector.cs
- InProcStateClientManager.cs
- TextBox.cs
- WriteableBitmap.cs
- Utils.cs
- TreeNodeEventArgs.cs
- DateTimeFormatInfoScanner.cs
- DiscoveryMessageSequence11.cs
- ConfigXmlReader.cs
- Regex.cs
- IgnoreDeviceFilterElementCollection.cs
- DragDropHelper.cs
- HttpVersion.cs
- XmlSignificantWhitespace.cs
- QueryStringConverter.cs
- TextContainerHelper.cs
- Constants.cs
- CachedFontFace.cs
- ClearTypeHintValidation.cs
- HyperLinkStyle.cs
- PolyLineSegment.cs
- PerformanceCounterManager.cs
- ComponentCollection.cs
- SQLDateTimeStorage.cs
- CurrentChangingEventArgs.cs
- XmlAttributeCollection.cs
- PipeConnection.cs
- WorkflowMarkupSerializationProvider.cs
- FieldInfo.cs
- SafeMILHandleMemoryPressure.cs
- Matrix3D.cs
- ReadWriteSpinLock.cs
- IItemContainerGenerator.cs
- DrawingContextWalker.cs
- SoapExtensionReflector.cs
- CustomExpressionEventArgs.cs
- ObjectIDGenerator.cs
- XPathSelfQuery.cs
- ProcessManager.cs
- XmlSchemaException.cs
- PersonalizationProvider.cs
- ProtocolsSection.cs
- MailMessageEventArgs.cs
- RightsManagementResourceHelper.cs
- InternalBufferManager.cs
- TableLayoutRowStyleCollection.cs
- ReadOnlyDataSourceView.cs
- FixedDSBuilder.cs
- UIElementParagraph.cs
- Image.cs
- ChildTable.cs
- ControlCachePolicy.cs
- ListViewTableRow.cs
- ConditionalAttribute.cs
- ObsoleteAttribute.cs
- ProxyGenerationError.cs
- WinEventHandler.cs
- SurrogateChar.cs
- MarshalDirectiveException.cs
- Dynamic.cs
- XmlIterators.cs
- InfoCardArgumentException.cs
- ItemContainerProviderWrapper.cs
- CodeTypeOfExpression.cs
- KeyNotFoundException.cs
- ZipIOModeEnforcingStream.cs
- QueuePropertyVariants.cs
- NestPullup.cs
- AuthenticationConfig.cs
- BinaryParser.cs
- PermissionToken.cs
- CircleEase.cs
- PagesChangedEventArgs.cs
- UnSafeCharBuffer.cs
- CatalogPart.cs
- ColumnWidthChangingEvent.cs
- CacheRequest.cs
- WebPartPersonalization.cs
- SafeIUnknown.cs
- ObservableDictionary.cs
- MarkupCompilePass2.cs
- ScrollProviderWrapper.cs
- XmlQualifiedName.cs
- ExpandCollapseProviderWrapper.cs
- XPathExpr.cs
- _ConnectOverlappedAsyncResult.cs
- TypeBuilderInstantiation.cs
- RepeatBehaviorConverter.cs