Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- EntityModelBuildProvider.cs
- ListBoxChrome.cs
- RegionInfo.cs
- GZipDecoder.cs
- WSSecurityPolicy.cs
- SymDocumentType.cs
- DeleteBookmarkScope.cs
- QueryOperationResponseOfT.cs
- XmlSchemaComplexContentRestriction.cs
- RegisteredHiddenField.cs
- DataGridClipboardHelper.cs
- ResourceSet.cs
- GroupBox.cs
- MenuItemAutomationPeer.cs
- XamlVector3DCollectionSerializer.cs
- Trigger.cs
- InnerItemCollectionView.cs
- DocumentEventArgs.cs
- SqlInternalConnectionTds.cs
- EditorZone.cs
- XslAstAnalyzer.cs
- Configuration.cs
- MethodImplAttribute.cs
- ImageIndexConverter.cs
- DataRecordObjectView.cs
- XmlHierarchicalEnumerable.cs
- CorrelationManager.cs
- ProfileEventArgs.cs
- InvokePattern.cs
- BitArray.cs
- Aggregates.cs
- Validator.cs
- TableColumn.cs
- Window.cs
- RuntimeConfigLKG.cs
- SourceLocation.cs
- CreationContext.cs
- SiteMapNodeItem.cs
- TagMapInfo.cs
- AppDomainProtocolHandler.cs
- RealizationDrawingContextWalker.cs
- D3DImage.cs
- WebBrowsableAttribute.cs
- MailMessage.cs
- ISFClipboardData.cs
- BridgeDataReader.cs
- RijndaelManaged.cs
- CheckedPointers.cs
- figurelengthconverter.cs
- SamlAudienceRestrictionCondition.cs
- AmbientLight.cs
- BehaviorDragDropEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- KeyFrames.cs
- HtmlString.cs
- SimpleRecyclingCache.cs
- LongCountAggregationOperator.cs
- ConsumerConnectionPoint.cs
- LinkedResource.cs
- WsatServiceAddress.cs
- XmlSchemaInferenceException.cs
- DependencyPropertyKey.cs
- TypedElement.cs
- SqlMethodCallConverter.cs
- List.cs
- ResumeStoryboard.cs
- DeploymentSectionCache.cs
- ReturnEventArgs.cs
- KeyTime.cs
- ResXResourceReader.cs
- CreateRefExpr.cs
- VisualStyleElement.cs
- ExtensionSimplifierMarkupObject.cs
- DrawTreeNodeEventArgs.cs
- GenericUriParser.cs
- WebBrowser.cs
- SqlVersion.cs
- MetadataSerializer.cs
- DataObjectFieldAttribute.cs
- DesignerActionVerbList.cs
- RecognizerStateChangedEventArgs.cs
- XmlSchemaProviderAttribute.cs
- DragStartedEventArgs.cs
- WebSysDisplayNameAttribute.cs
- TransformGroup.cs
- EncryptedPackageFilter.cs
- SafeNativeMemoryHandle.cs
- PolicyReader.cs
- ExtenderHelpers.cs
- CompiledQuery.cs
- _LocalDataStore.cs
- SystemSounds.cs
- SafeMILHandle.cs
- MachinePropertyVariants.cs
- SchemaImporterExtension.cs
- DecimalFormatter.cs
- PrintDocument.cs
- ConfigurationManagerHelperFactory.cs
- DependencyProperty.cs
- HttpInputStream.cs