Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PageBuildProvider.cs
- SqlXmlStorage.cs
- DataTableNewRowEvent.cs
- RawStylusInputReport.cs
- PerformanceCounter.cs
- SynchronizedChannelCollection.cs
- ParseNumbers.cs
- GlyphShapingProperties.cs
- SmtpReplyReaderFactory.cs
- LabelInfo.cs
- ActiveXSite.cs
- AxisAngleRotation3D.cs
- SerializationInfo.cs
- CommandDevice.cs
- SecurityHeader.cs
- RequestCacheEntry.cs
- SoapEnumAttribute.cs
- SqlTriggerAttribute.cs
- CalendarButton.cs
- DataGridViewSelectedCellCollection.cs
- WhitespaceRule.cs
- HiddenFieldPageStatePersister.cs
- HttpListenerContext.cs
- PrinterSettings.cs
- OuterGlowBitmapEffect.cs
- HttpResponse.cs
- FileLogRecord.cs
- BitmapMetadata.cs
- GridViewDesigner.cs
- RegexTree.cs
- IssuedTokenClientElement.cs
- DetailsViewDesigner.cs
- EndpointIdentityConverter.cs
- DataGridViewBand.cs
- WebPartManagerInternals.cs
- _IPv6Address.cs
- BindingMemberInfo.cs
- InternalBufferOverflowException.cs
- HashMembershipCondition.cs
- DefaultProxySection.cs
- mongolianshape.cs
- FilterException.cs
- NotificationContext.cs
- SqlMethodAttribute.cs
- ProcessInputEventArgs.cs
- PingReply.cs
- InvalidOperationException.cs
- EntryWrittenEventArgs.cs
- TypeGeneratedEventArgs.cs
- PolygonHotSpot.cs
- IconConverter.cs
- HtmlInputCheckBox.cs
- CompilerState.cs
- SessionStateItemCollection.cs
- GridViewRowCollection.cs
- FixedSOMLineRanges.cs
- AttributedMetaModel.cs
- OutputCacheSettings.cs
- LoginName.cs
- ObjectStateEntry.cs
- LayoutSettings.cs
- MetadataArtifactLoaderComposite.cs
- DependencyObjectCodeDomSerializer.cs
- EditorPart.cs
- BinaryCommonClasses.cs
- DateTimeParse.cs
- GZipStream.cs
- SpecialNameAttribute.cs
- SecureConversationServiceCredential.cs
- ToolStripControlHost.cs
- ButtonFieldBase.cs
- WizardForm.cs
- SmiMetaData.cs
- DesignTimeHTMLTextWriter.cs
- CommandExpr.cs
- NotCondition.cs
- TraceSection.cs
- MtomMessageEncoder.cs
- X509RawDataKeyIdentifierClause.cs
- SHA384Managed.cs
- DecimalConstantAttribute.cs
- LocalFileSettingsProvider.cs
- DispatcherExceptionEventArgs.cs
- LinkedDataMemberFieldEditor.cs
- SourceChangedEventArgs.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- ElementAction.cs
- Hash.cs
- UnsafeNativeMethods.cs
- SystemParameters.cs
- InputLanguageCollection.cs
- XmlAnyAttributeAttribute.cs
- DisplayInformation.cs
- DataListGeneralPage.cs
- CompositionDesigner.cs
- XmlKeywords.cs
- EllipseGeometry.cs
- LiteralControl.cs
- GenericRootAutomationPeer.cs
- SemaphoreSecurity.cs