Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TagPrefixAttribute.cs
- BaseProcessor.cs
- BigIntegerStorage.cs
- WebBrowserEvent.cs
- Binding.cs
- BaseAddressPrefixFilterElement.cs
- Int32EqualityComparer.cs
- QueueAccessMode.cs
- securitycriticaldata.cs
- PrintingPermissionAttribute.cs
- LicenseException.cs
- DataObjectSettingDataEventArgs.cs
- ScopelessEnumAttribute.cs
- ActiveDesignSurfaceEvent.cs
- DefaultAsyncDataDispatcher.cs
- EditorPartChrome.cs
- CardSpaceException.cs
- WebServiceData.cs
- TextDecorationCollection.cs
- ArraySubsetEnumerator.cs
- FixedSOMTable.cs
- TraceSwitch.cs
- SQLStringStorage.cs
- TextSegment.cs
- MimePart.cs
- AbsoluteQuery.cs
- ListControlBoundActionList.cs
- XmlTextEncoder.cs
- HwndMouseInputProvider.cs
- HitTestWithPointDrawingContextWalker.cs
- LabelDesigner.cs
- ScrollChangedEventArgs.cs
- JpegBitmapEncoder.cs
- InkCanvasSelectionAdorner.cs
- EntityRecordInfo.cs
- JournalNavigationScope.cs
- SiteMapNodeItemEventArgs.cs
- RijndaelManaged.cs
- StructuredTypeEmitter.cs
- SqlDataRecord.cs
- EmptyControlCollection.cs
- ToolStripPanelCell.cs
- CursorConverter.cs
- RequestCacheEntry.cs
- ColumnMap.cs
- SelectionItemPattern.cs
- InvalidFilterCriteriaException.cs
- HtmlHistory.cs
- WebPartTracker.cs
- XmlIgnoreAttribute.cs
- SafeMILHandleMemoryPressure.cs
- RoleManagerSection.cs
- JsonUriDataContract.cs
- ControlUtil.cs
- FormViewPageEventArgs.cs
- SoundPlayerAction.cs
- JsonClassDataContract.cs
- SlipBehavior.cs
- AspNetHostingPermission.cs
- ContainsRowNumberChecker.cs
- LogicalExpressionTypeConverter.cs
- MultiViewDesigner.cs
- HashMembershipCondition.cs
- DbDataAdapter.cs
- ApplicationGesture.cs
- SpecialNameAttribute.cs
- DefaultAsyncDataDispatcher.cs
- SymmetricSecurityProtocolFactory.cs
- PropVariant.cs
- NetCodeGroup.cs
- BindingCollection.cs
- ZipIOExtraField.cs
- GridViewPageEventArgs.cs
- ControlPaint.cs
- InternalConfigEventArgs.cs
- WebColorConverter.cs
- SoapAttributes.cs
- RequestCacheManager.cs
- HashCryptoHandle.cs
- SerializationFieldInfo.cs
- FlowchartStart.xaml.cs
- EncodingNLS.cs
- TrailingSpaceComparer.cs
- CompositeCollection.cs
- autovalidator.cs
- SqlError.cs
- ProfileSettingsCollection.cs
- PropertyManager.cs
- GeneralTransform3DGroup.cs
- ReliableRequestSessionChannel.cs
- GroupQuery.cs
- WebPartPersonalization.cs
- __Filters.cs
- ColumnReorderedEventArgs.cs
- HitTestFilterBehavior.cs
- Point4D.cs
- RsaKeyIdentifierClause.cs
- DataObjectEventArgs.cs
- EnumerableRowCollection.cs
- PersonalizationStateInfo.cs