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
- CodeArrayCreateExpression.cs
- TaiwanCalendar.cs
- QueryCacheManager.cs
- PeerInputChannelListener.cs
- ValuePattern.cs
- MasterPage.cs
- MergeFailedEvent.cs
- FunctionImportElement.cs
- BaseAutoFormat.cs
- XmlEntity.cs
- ExternalException.cs
- SchemaDeclBase.cs
- SubstitutionList.cs
- CodeCastExpression.cs
- SmiEventSink_Default.cs
- Faults.cs
- ProcessStartInfo.cs
- HtmlHead.cs
- XmlC14NWriter.cs
- TreeNodeSelectionProcessor.cs
- NamespaceQuery.cs
- SqlNamer.cs
- Route.cs
- WebPageTraceListener.cs
- SuppressMergeCheckAttribute.cs
- ConstNode.cs
- IdentityManager.cs
- errorpatternmatcher.cs
- Camera.cs
- XmlQuerySequence.cs
- WebBrowserBase.cs
- CollectionTypeElement.cs
- ModelFunction.cs
- MachineKeyConverter.cs
- sqlnorm.cs
- VarInfo.cs
- BamlRecords.cs
- EventArgs.cs
- FillErrorEventArgs.cs
- TextServicesProperty.cs
- RowSpanVector.cs
- XmlText.cs
- TextContainerHelper.cs
- StringSource.cs
- UpdateManifestForBrowserApplication.cs
- PaginationProgressEventArgs.cs
- FragmentQueryKB.cs
- HtmlGenericControl.cs
- DrawingContext.cs
- entityreference_tresulttype.cs
- PropertyEntry.cs
- IssuedSecurityTokenParameters.cs
- Pen.cs
- PanningMessageFilter.cs
- DataComponentNameHandler.cs
- BindingContext.cs
- ImplicitInputBrush.cs
- AutomationElementCollection.cs
- KeyValueConfigurationCollection.cs
- RequestCacheValidator.cs
- CheckBoxStandardAdapter.cs
- BufferAllocator.cs
- Mapping.cs
- Shape.cs
- DesignerResources.cs
- RichTextBoxConstants.cs
- EntityTypeEmitter.cs
- SinglePhaseEnlistment.cs
- NameTable.cs
- XsltConvert.cs
- PathFigureCollectionValueSerializer.cs
- WorkflowApplicationCompletedEventArgs.cs
- UserControl.cs
- SoundPlayer.cs
- RepeaterItem.cs
- BlurEffect.cs
- ImmutableAssemblyCacheEntry.cs
- LinkedResource.cs
- ProjectionPruner.cs
- ResourceDisplayNameAttribute.cs
- TypeSemantics.cs
- Dispatcher.cs
- StringResourceManager.cs
- ProcessThread.cs
- WindowsAuthenticationModule.cs
- OleDbDataReader.cs
- CapabilitiesSection.cs
- SafeTokenHandle.cs
- HashRepartitionStream.cs
- DashStyles.cs
- FixedLineResult.cs
- ParameterCollection.cs
- ResourceKey.cs
- FloaterBaseParagraph.cs
- HyperLinkColumn.cs
- MobileTextWriter.cs
- XPathNodePointer.cs
- WindowsAltTab.cs
- TextElementEnumerator.cs
- ShadowGlyph.cs