Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- SafeReversePInvokeHandle.cs
- ByteKeyFrameCollection.cs
- MenuScrollingVisibilityConverter.cs
- AudioFormatConverter.cs
- XmlILIndex.cs
- XmlAnyElementAttribute.cs
- ContextBase.cs
- StringReader.cs
- CdpEqualityComparer.cs
- WindowsListViewScroll.cs
- NullReferenceException.cs
- OleDbConnectionInternal.cs
- ModuleConfigurationInfo.cs
- SqlDependency.cs
- OciHandle.cs
- VoiceInfo.cs
- AllMembershipCondition.cs
- ObjectDataSourceDisposingEventArgs.cs
- NetworkInterface.cs
- NullableDoubleSumAggregationOperator.cs
- AppSecurityManager.cs
- ConfigurationValidatorBase.cs
- ACE.cs
- ContentElementCollection.cs
- PathSegmentCollection.cs
- LayoutDump.cs
- PageContentCollection.cs
- CollectionViewGroup.cs
- _ServiceNameStore.cs
- ScrollableControl.cs
- ClientProxyGenerator.cs
- NamespaceDecl.cs
- Component.cs
- DataGridViewTextBoxCell.cs
- WindowsPrincipal.cs
- BroadcastEventHelper.cs
- DoubleIndependentAnimationStorage.cs
- FixedFlowMap.cs
- WindowsAuthenticationModule.cs
- TypedTableGenerator.cs
- PkcsMisc.cs
- NativeMethods.cs
- ArraySubsetEnumerator.cs
- PropertyChange.cs
- DiffuseMaterial.cs
- ClientRuntimeConfig.cs
- ToolStripPanelRow.cs
- RegexGroupCollection.cs
- TextTreeObjectNode.cs
- DetailsViewCommandEventArgs.cs
- ComboBoxRenderer.cs
- ControlParameter.cs
- LOSFormatter.cs
- SystemIPGlobalProperties.cs
- ServiceDiscoveryElement.cs
- OracleException.cs
- entityreference_tresulttype.cs
- SingleSelectRootGridEntry.cs
- ipaddressinformationcollection.cs
- XmlSchemaSimpleTypeUnion.cs
- DllNotFoundException.cs
- MenuItemBindingCollection.cs
- Literal.cs
- VirtualPathData.cs
- StorageFunctionMapping.cs
- ConfigXmlSignificantWhitespace.cs
- ScrollChrome.cs
- WasAdminWrapper.cs
- Identity.cs
- assertwrapper.cs
- ArrayConverter.cs
- ExpandSegmentCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- Point.cs
- ClientSponsor.cs
- JobCollate.cs
- DataGridViewTopLeftHeaderCell.cs
- BitmapEncoder.cs
- ObjectDataSourceFilteringEventArgs.cs
- ValidationHelper.cs
- DesignerRegionMouseEventArgs.cs
- ContextStack.cs
- PointLightBase.cs
- SystemIPGlobalProperties.cs
- CheckStoreFileValidityRequest.cs
- SystemWebSectionGroup.cs
- AuthStoreRoleProvider.cs
- IdentitySection.cs
- Oci.cs
- ListGeneralPage.cs
- localization.cs
- MachineSettingsSection.cs
- XMLSchema.cs
- TextEditor.cs
- UnknownBitmapEncoder.cs
- InkCanvasFeedbackAdorner.cs
- IntSecurity.cs
- DetailsViewDeletedEventArgs.cs
- RectangleHotSpot.cs
- ActivityLocationReferenceEnvironment.cs