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
- ContainerFilterService.cs
- DeviceContext2.cs
- LinkClickEvent.cs
- ScrollProperties.cs
- ObsoleteAttribute.cs
- ErrorFormatter.cs
- ToolStripItemDesigner.cs
- ValidationSummary.cs
- OptimizedTemplateContentHelper.cs
- OraclePermissionAttribute.cs
- TcpProcessProtocolHandler.cs
- HttpStreamMessageEncoderFactory.cs
- WindowProviderWrapper.cs
- XhtmlBasicLiteralTextAdapter.cs
- Single.cs
- XPathNodePointer.cs
- SourceInterpreter.cs
- SizeAnimationClockResource.cs
- CustomGrammar.cs
- PositiveTimeSpanValidator.cs
- SystemDiagnosticsSection.cs
- WebScriptMetadataFormatter.cs
- Normalization.cs
- CodeTypeDeclarationCollection.cs
- TreeChangeInfo.cs
- FileDialog_Vista_Interop.cs
- TdsParserStaticMethods.cs
- TreeBuilderXamlTranslator.cs
- SqlTypesSchemaImporter.cs
- TransformerInfo.cs
- TextEndOfLine.cs
- ReadWriteObjectLock.cs
- DesignerDataParameter.cs
- ApplicationServiceManager.cs
- XmlNodeChangedEventArgs.cs
- EnumValAlphaComparer.cs
- LinkLabelLinkClickedEvent.cs
- FormatPage.cs
- DesignerGenericWebPart.cs
- RouteValueDictionary.cs
- FileLogRecordEnumerator.cs
- IISMapPath.cs
- TextBoxLine.cs
- DataGridViewCheckBoxColumn.cs
- WorkflowPrinting.cs
- SecurityTokenValidationException.cs
- PropertyMap.cs
- ContentFilePart.cs
- TextInfo.cs
- FileDetails.cs
- LinkDesigner.cs
- TabletDevice.cs
- ErrorRuntimeConfig.cs
- InitializationEventAttribute.cs
- TextDecorationUnitValidation.cs
- GridViewEditEventArgs.cs
- DecimalConverter.cs
- WorkflowServiceHostFactory.cs
- DataGridViewAutoSizeModeEventArgs.cs
- PropertyIdentifier.cs
- TreeNodeMouseHoverEvent.cs
- Polyline.cs
- Thickness.cs
- MaterialCollection.cs
- ConditionalDesigner.cs
- ListenDesigner.cs
- SmtpException.cs
- CodeDomComponentSerializationService.cs
- WindowsToolbarAsMenu.cs
- ParallelEnumerable.cs
- IProducerConsumerCollection.cs
- AbsoluteQuery.cs
- Console.cs
- TransformedBitmap.cs
- MetafileHeaderEmf.cs
- TraceLevelStore.cs
- SerialPort.cs
- AssemblyBuilder.cs
- GridItemProviderWrapper.cs
- InvalidPropValue.cs
- userdatakeys.cs
- DependencyObjectValidator.cs
- ObjectRef.cs
- ErrorLog.cs
- Cursors.cs
- WebPartsPersonalizationAuthorization.cs
- DynamicEntity.cs
- MultiView.cs
- RuntimeConfigLKG.cs
- TailCallAnalyzer.cs
- BitmapMetadataEnumerator.cs
- XpsSerializerWriter.cs
- HTMLTagNameToTypeMapper.cs
- WebPartMenu.cs
- PrivilegedConfigurationManager.cs
- QueryResponse.cs
- SqlWorkflowPersistenceService.cs
- Triplet.cs
- SignedXml.cs
- StringArrayConverter.cs