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
- AnnotationMap.cs
- HandlerBase.cs
- AttachmentService.cs
- NumericUpDownAccelerationCollection.cs
- SectionUpdates.cs
- EventPrivateKey.cs
- PageCodeDomTreeGenerator.cs
- ArrayHelper.cs
- EnumUnknown.cs
- SchemaElementDecl.cs
- SRef.cs
- InstalledFontCollection.cs
- MailBnfHelper.cs
- DiffuseMaterial.cs
- Win32PrintDialog.cs
- DetailsView.cs
- SqlBulkCopyColumnMappingCollection.cs
- ColorContext.cs
- ProcessInfo.cs
- ClientScriptItem.cs
- ObjectTag.cs
- basecomparevalidator.cs
- ContentControl.cs
- KeyPullup.cs
- BaseDataList.cs
- RegistrySecurity.cs
- StorageSetMapping.cs
- NetworkStream.cs
- QueryRewriter.cs
- DataGridViewColumnCollectionEditor.cs
- ImageDrawing.cs
- TemplateBaseAction.cs
- TrustManager.cs
- MediaContext.cs
- InheritanceUI.cs
- BinHexDecoder.cs
- ConfigurationProperty.cs
- PersonalizationState.cs
- DataControlFieldCell.cs
- SqlRewriteScalarSubqueries.cs
- DateTimeParse.cs
- CertificateManager.cs
- FormViewDeletedEventArgs.cs
- EntityCodeGenerator.cs
- StructuralType.cs
- ConfigXmlElement.cs
- Button.cs
- QilScopedVisitor.cs
- CodeDOMProvider.cs
- EditorZoneAutoFormat.cs
- ObjectView.cs
- DataControlLinkButton.cs
- PageStatePersister.cs
- IntSecurity.cs
- ContainerControl.cs
- DataGridHelper.cs
- SafeSystemMetrics.cs
- QilInvoke.cs
- AdRotator.cs
- LocalValueEnumerator.cs
- DbgUtil.cs
- KeyValuePairs.cs
- XmlSignificantWhitespace.cs
- SHA384Managed.cs
- CodeParameterDeclarationExpressionCollection.cs
- iisPickupDirectory.cs
- EqualityComparer.cs
- EventArgs.cs
- Brush.cs
- Point3DCollection.cs
- DateTimeValueSerializerContext.cs
- InvariantComparer.cs
- OrthographicCamera.cs
- RulePatternOps.cs
- CanonicalFormWriter.cs
- UnsafeNativeMethods.cs
- RectIndependentAnimationStorage.cs
- Calendar.cs
- EntityTransaction.cs
- CodeNamespaceImportCollection.cs
- WithStatement.cs
- Thumb.cs
- LateBoundBitmapDecoder.cs
- ExtractorMetadata.cs
- ScriptingSectionGroup.cs
- InstanceView.cs
- PrimitiveType.cs
- TemplatedMailWebEventProvider.cs
- CompilerCollection.cs
- SplitterCancelEvent.cs
- DynamicUpdateCommand.cs
- IBuiltInEvidence.cs
- SelectionPatternIdentifiers.cs
- LayoutManager.cs
- CodeDirectoryCompiler.cs
- UriTemplateDispatchFormatter.cs
- FontStretches.cs
- ParameterToken.cs
- SecuritySessionSecurityTokenProvider.cs
- DeferredSelectedIndexReference.cs