Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- WindowsRebar.cs
- HwndHost.cs
- UniqueIdentifierService.cs
- PersonalizablePropertyEntry.cs
- ScaleTransform.cs
- HostedElements.cs
- DragDeltaEventArgs.cs
- x509utils.cs
- ProtocolsConfigurationEntry.cs
- RoleServiceManager.cs
- EventListenerClientSide.cs
- TextEffect.cs
- TreeNodeStyle.cs
- ColumnMapVisitor.cs
- ExceptionUtil.cs
- XmlQueryRuntime.cs
- BitmapEffectInputData.cs
- MetricEntry.cs
- InputScope.cs
- CompModSwitches.cs
- SingleStorage.cs
- ExeContext.cs
- NamespaceList.cs
- DrawingGroup.cs
- OleDbParameter.cs
- SqlAliaser.cs
- XmlCharType.cs
- DataBindingCollection.cs
- SmtpFailedRecipientsException.cs
- HitTestWithPointDrawingContextWalker.cs
- ThreadExceptionEvent.cs
- XmlQueryRuntime.cs
- AsymmetricSignatureDeformatter.cs
- AstNode.cs
- WebPartChrome.cs
- CodeSubDirectory.cs
- AmbiguousMatchException.cs
- CodeTryCatchFinallyStatement.cs
- RMEnrollmentPage1.cs
- SystemResourceKey.cs
- EntitySetBase.cs
- TemplatePagerField.cs
- SqlTransaction.cs
- DataTableNewRowEvent.cs
- EntitySqlQueryState.cs
- MenuStrip.cs
- WpfPayload.cs
- sqlser.cs
- MulticastNotSupportedException.cs
- DbModificationClause.cs
- Monitor.cs
- ISAPIRuntime.cs
- BaseValidator.cs
- xml.cs
- ToolBarOverflowPanel.cs
- AddInContractAttribute.cs
- AccessText.cs
- TableCell.cs
- RunInstallerAttribute.cs
- SplashScreen.cs
- TaiwanLunisolarCalendar.cs
- GenericPrincipal.cs
- ReflectTypeDescriptionProvider.cs
- CodeSubDirectoriesCollection.cs
- SchemaDeclBase.cs
- ZipIOLocalFileDataDescriptor.cs
- PreviewKeyDownEventArgs.cs
- MouseGestureValueSerializer.cs
- DataTableExtensions.cs
- DocumentXmlWriter.cs
- VBIdentifierNameEditor.cs
- InternalConfigSettingsFactory.cs
- EndpointDispatcher.cs
- CheckBoxRenderer.cs
- Compiler.cs
- FunctionCommandText.cs
- SelectionEditingBehavior.cs
- FixedPageStructure.cs
- QueryRelOp.cs
- WebReferencesBuildProvider.cs
- BinaryHeap.cs
- PieceNameHelper.cs
- TextSelectionProcessor.cs
- FtpRequestCacheValidator.cs
- DebugView.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- EncryptedPackageFilter.cs
- EncoderBestFitFallback.cs
- DataRowView.cs
- TableRow.cs
- FixedSOMTextRun.cs
- MessageBox.cs
- CapabilitiesState.cs
- BufferBuilder.cs
- ThemeableAttribute.cs
- Pen.cs
- InlineCollection.cs
- Cursors.cs
- OdbcEnvironment.cs
- CharEnumerator.cs