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
- DesignTimeTemplateParser.cs
- Span.cs
- Trace.cs
- ExceptionUtil.cs
- WmlMobileTextWriter.cs
- PointLight.cs
- XmlSchemaAnnotated.cs
- ListDictionary.cs
- InArgumentConverter.cs
- UnsafeNativeMethods.cs
- QueryGenerator.cs
- XDeferredAxisSource.cs
- MediaPlayer.cs
- FontUnit.cs
- SpanIndex.cs
- StreamInfo.cs
- ReverseInheritProperty.cs
- SiteMapPath.cs
- DataObjectAttribute.cs
- Listbox.cs
- StyleCollectionEditor.cs
- Int64KeyFrameCollection.cs
- FtpWebRequest.cs
- Main.cs
- CssStyleCollection.cs
- _UriTypeConverter.cs
- LinqDataSourceStatusEventArgs.cs
- StylusPoint.cs
- StorageAssociationSetMapping.cs
- PathGeometry.cs
- ComEventsHelper.cs
- FontCollection.cs
- DoubleLink.cs
- SendMailErrorEventArgs.cs
- VectorCollectionConverter.cs
- Module.cs
- InfoCardPolicy.cs
- DataBoundControlHelper.cs
- XmlChoiceIdentifierAttribute.cs
- ImageDrawing.cs
- Lease.cs
- SrgsNameValueTag.cs
- Marshal.cs
- XmlSerializerNamespaces.cs
- IfJoinedCondition.cs
- XmlSchemaImport.cs
- SmtpNtlmAuthenticationModule.cs
- HttpHandlerActionCollection.cs
- CollectionBuilder.cs
- DataViewManager.cs
- UxThemeWrapper.cs
- CompoundFileDeflateTransform.cs
- Math.cs
- EventLogEntryCollection.cs
- TreeNode.cs
- EnvelopedPkcs7.cs
- FilterElement.cs
- UnitySerializationHolder.cs
- WindowInteropHelper.cs
- PageAsyncTask.cs
- NameTable.cs
- ElementHost.cs
- PagerSettings.cs
- IdentityNotMappedException.cs
- MetabaseReader.cs
- FontWeight.cs
- Helper.cs
- TypeElement.cs
- XamlStream.cs
- WebCategoryAttribute.cs
- SqlFlattener.cs
- ADConnectionHelper.cs
- CacheOutputQuery.cs
- BamlResourceContent.cs
- HwndProxyElementProvider.cs
- WmlObjectListAdapter.cs
- MetadataItemSerializer.cs
- SchemaElementLookUpTable.cs
- EventQueueState.cs
- ZipIOLocalFileDataDescriptor.cs
- ProtectedProviderSettings.cs
- SqlBulkCopyColumnMappingCollection.cs
- RsaElement.cs
- TextServicesCompartmentEventSink.cs
- UnsafeNativeMethods.cs
- TableAdapterManagerGenerator.cs
- ListViewAutomationPeer.cs
- StorageModelBuildProvider.cs
- SecurityListenerSettingsLifetimeManager.cs
- DataSourceGeneratorException.cs
- PointHitTestParameters.cs
- ToolBarButtonClickEvent.cs
- Vector3DValueSerializer.cs
- RuleSettingsCollection.cs
- UnsafeNativeMethods.cs
- ListDependantCardsRequest.cs
- XamlStyleSerializer.cs
- ResourceContainer.cs
- DataGridViewColumnEventArgs.cs
- MarkupObject.cs