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
- SQlBooleanStorage.cs
- ResourceProperty.cs
- SatelliteContractVersionAttribute.cs
- SystemUnicastIPAddressInformation.cs
- ToolStripScrollButton.cs
- RuntimeConfigurationRecord.cs
- OleDbErrorCollection.cs
- TypeExtensionSerializer.cs
- DBPropSet.cs
- DocumentOrderQuery.cs
- CanonicalizationDriver.cs
- HyperLink.cs
- ApplicationHost.cs
- InputBuffer.cs
- Table.cs
- ScrollViewer.cs
- LambdaCompiler.Lambda.cs
- ClientSideQueueItem.cs
- HwndSourceKeyboardInputSite.cs
- ManagedIStream.cs
- RelationshipNavigation.cs
- ArraySet.cs
- WebServiceMethodData.cs
- PieceDirectory.cs
- AppDomainFactory.cs
- ObjectDataSourceStatusEventArgs.cs
- MimeParameters.cs
- SchemaImporterExtensionElement.cs
- Mappings.cs
- TiffBitmapEncoder.cs
- SafePEFileHandle.cs
- SeverityFilter.cs
- _HeaderInfo.cs
- Stackframe.cs
- ConstNode.cs
- ShaperBuffers.cs
- SymmetricAlgorithm.cs
- Vector3DAnimationUsingKeyFrames.cs
- WCFModelStrings.Designer.cs
- PassportIdentity.cs
- WindowExtensionMethods.cs
- BitmapEffectCollection.cs
- DiscoveryVersionConverter.cs
- ToolStripLabel.cs
- AnnotationObservableCollection.cs
- ProfessionalColors.cs
- AudienceUriMode.cs
- BufferedGraphics.cs
- UnaryNode.cs
- HuffModule.cs
- BorderSidesEditor.cs
- MenuScrollingVisibilityConverter.cs
- BatchWriter.cs
- CodeTypeParameter.cs
- BitmapFrameDecode.cs
- RecognizerStateChangedEventArgs.cs
- GridViewColumnHeaderAutomationPeer.cs
- Opcode.cs
- regiisutil.cs
- BindingRestrictions.cs
- OdbcParameterCollection.cs
- ZipFileInfo.cs
- ISAPIApplicationHost.cs
- DesignerHelpers.cs
- Form.cs
- Column.cs
- IProvider.cs
- XmlSchemaSimpleTypeRestriction.cs
- SharedPerformanceCounter.cs
- Rules.cs
- SafeTimerHandle.cs
- EventProxy.cs
- ErrorWrapper.cs
- ListViewEditEventArgs.cs
- ProtocolsConfigurationEntry.cs
- AsymmetricCryptoHandle.cs
- _HeaderInfo.cs
- AnnotationComponentChooser.cs
- BooleanExpr.cs
- TransformerTypeCollection.cs
- HttpCookieCollection.cs
- StateMachineSubscriptionManager.cs
- RepeatBehavior.cs
- EventMetadata.cs
- SoapConverter.cs
- CompilerScope.Storage.cs
- TreeViewCancelEvent.cs
- CodeTypeOfExpression.cs
- ProfileSettings.cs
- IndexedSelectQueryOperator.cs
- Int64Animation.cs
- SymmetricCryptoHandle.cs
- DbLambda.cs
- Nodes.cs
- TextElement.cs
- ImageFormatConverter.cs
- ContractTypeNameElement.cs
- DataSourceProvider.cs
- HtmlShim.cs
- StreamedWorkflowDefinitionContext.cs