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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AssociationSetEnd.cs
- ViewBox.cs
- EventSource.cs
- CellCreator.cs
- Matrix3D.cs
- CommonObjectSecurity.cs
- XamlWriter.cs
- ToolStripItemBehavior.cs
- TextEditorParagraphs.cs
- HtmlMeta.cs
- HMACSHA384.cs
- SqlXml.cs
- XmlUrlEditor.cs
- ApplicationSettingsBase.cs
- TextServicesCompartmentContext.cs
- CodeDelegateInvokeExpression.cs
- SafeRightsManagementHandle.cs
- AddInStore.cs
- ResourceContainer.cs
- InputDevice.cs
- CopyNamespacesAction.cs
- TaskHelper.cs
- HttpFileCollection.cs
- X509ChainPolicy.cs
- DependencyStoreSurrogate.cs
- FormParameter.cs
- EmptyCollection.cs
- NullRuntimeConfig.cs
- DataGridCaption.cs
- DateTimeFormatInfo.cs
- WindowsFormsHostAutomationPeer.cs
- BaseDataBoundControl.cs
- DefaultBinder.cs
- BindingContext.cs
- Property.cs
- SecurityContext.cs
- HttpCookiesSection.cs
- XmlElementElement.cs
- XmlFileEditor.cs
- TransformConverter.cs
- FileLevelControlBuilderAttribute.cs
- Visual3D.cs
- EntityContainer.cs
- ListBindableAttribute.cs
- _LazyAsyncResult.cs
- XmlNamespaceMappingCollection.cs
- StringResourceManager.cs
- ObjectListDesigner.cs
- InternalPermissions.cs
- ListMarkerLine.cs
- PageCodeDomTreeGenerator.cs
- ProgressBarHighlightConverter.cs
- UriExt.cs
- CustomErrorsSectionWrapper.cs
- FolderBrowserDialog.cs
- EntitySqlQueryCacheEntry.cs
- LogSwitch.cs
- ColumnCollection.cs
- UndirectedGraph.cs
- SuppressMessageAttribute.cs
- SqlDataSourceCustomCommandEditor.cs
- SuppressIldasmAttribute.cs
- ProviderUtil.cs
- StaticFileHandler.cs
- HScrollProperties.cs
- DownloadProgressEventArgs.cs
- StringCollection.cs
- ObjectHelper.cs
- WebPartsPersonalization.cs
- XhtmlBasicLiteralTextAdapter.cs
- Panel.cs
- TTSEngineProxy.cs
- httpserverutility.cs
- SubMenuStyleCollection.cs
- RegistryPermission.cs
- OleDbSchemaGuid.cs
- FixedSOMPageConstructor.cs
- AsyncOperationManager.cs
- WebScriptMetadataFormatter.cs
- AsyncContentLoadedEventArgs.cs
- TextSpanModifier.cs
- DurationConverter.cs
- EtwTrace.cs
- XamlStream.cs
- TraceSource.cs
- ToolStripItemRenderEventArgs.cs
- ControlBuilder.cs
- ListBoxAutomationPeer.cs
- DesignerEditorPartChrome.cs
- recordstatefactory.cs
- TypeHelper.cs
- EntityReference.cs
- FontInfo.cs
- CodeStatementCollection.cs
- XmlHierarchyData.cs
- SafeFileMappingHandle.cs
- PathFigureCollectionValueSerializer.cs
- ByteAnimationBase.cs
- BaseComponentEditor.cs
- MetadataCacheItem.cs