Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GlyphTypeface.cs
- ClientConvert.cs
- HeaderedContentControl.cs
- CodeDirectoryCompiler.cs
- MissingFieldException.cs
- NameValueConfigurationElement.cs
- RadioButton.cs
- PermissionAttributes.cs
- TrailingSpaceComparer.cs
- FormatSettings.cs
- HttpGetClientProtocol.cs
- TextEvent.cs
- ThicknessAnimation.cs
- CompilerGeneratedAttribute.cs
- TextBoxAutomationPeer.cs
- ObjectHandle.cs
- SoapHeaderAttribute.cs
- AxHostDesigner.cs
- BlurBitmapEffect.cs
- CustomLineCap.cs
- BrowserDefinition.cs
- ConfigXmlText.cs
- ImageFormatConverter.cs
- CodeSubDirectory.cs
- MenuAdapter.cs
- WebBrowserDocumentCompletedEventHandler.cs
- DataSetMappper.cs
- PageCache.cs
- DataGridViewRowPostPaintEventArgs.cs
- DocumentSignatureManager.cs
- StreamWithDictionary.cs
- WCFModelStrings.Designer.cs
- StringStorage.cs
- _NestedMultipleAsyncResult.cs
- UiaCoreProviderApi.cs
- FixUp.cs
- StorageComplexTypeMapping.cs
- DispatcherSynchronizationContext.cs
- SamlAuthenticationClaimResource.cs
- InterleavedZipPartStream.cs
- ResourceBinder.cs
- ScrollBar.cs
- X509SecurityTokenProvider.cs
- WindowsStatic.cs
- ObjectHelper.cs
- SchemaImporterExtension.cs
- HighlightComponent.cs
- NumericExpr.cs
- UidPropertyAttribute.cs
- ConfigurationElementCollection.cs
- XamlUtilities.cs
- XPathNavigatorReader.cs
- PermissionRequestEvidence.cs
- SafeReversePInvokeHandle.cs
- AttributeSetAction.cs
- EntityProxyFactory.cs
- ResourceSet.cs
- TraceContextRecord.cs
- ComponentRenameEvent.cs
- WbmpConverter.cs
- MimeAnyImporter.cs
- TranslateTransform.cs
- ViewLoader.cs
- DebugView.cs
- ZipIOExtraField.cs
- XmlNodeChangedEventArgs.cs
- connectionpool.cs
- ObjRef.cs
- MetadataPropertyAttribute.cs
- OleDbError.cs
- MobileListItemCollection.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TemplateEditingFrame.cs
- InputBindingCollection.cs
- Path.cs
- ImageAttributes.cs
- CommandID.cs
- DeviceContext2.cs
- WizardForm.cs
- EventProxy.cs
- Point.cs
- Options.cs
- UInt64Storage.cs
- Point3DCollectionConverter.cs
- GeneralTransform2DTo3DTo2D.cs
- MarkedHighlightComponent.cs
- ByteAnimationBase.cs
- ControlIdConverter.cs
- BinHexDecoder.cs
- UnsafeNativeMethodsTablet.cs
- DataContractAttribute.cs
- WebPartDeleteVerb.cs
- OptimizedTemplateContentHelper.cs
- DesignerSerializationOptionsAttribute.cs
- LicenseProviderAttribute.cs
- FixedSOMTableRow.cs
- XmlAttributeAttribute.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- InstanceNotReadyException.cs
- TimelineGroup.cs