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
- SessionSwitchEventArgs.cs
- ImmutableClientRuntime.cs
- SmiContext.cs
- SqlGatherProducedAliases.cs
- MultiBindingExpression.cs
- ExtenderProviderService.cs
- PolyBezierSegment.cs
- CodeGroup.cs
- XmlSchemaAppInfo.cs
- TextTreeRootTextBlock.cs
- SecurityTimestamp.cs
- HtmlFormParameterReader.cs
- DataPagerFieldCollection.cs
- securestring.cs
- QilReference.cs
- PathGeometry.cs
- MobileErrorInfo.cs
- ConstructorNeedsTagAttribute.cs
- EqualityComparer.cs
- MonikerSyntaxException.cs
- AssemblyHelper.cs
- DateTimeValueSerializerContext.cs
- ZipPackagePart.cs
- MeasureData.cs
- PageRanges.cs
- Environment.cs
- DataControlExtensions.cs
- BridgeDataReader.cs
- StringStorage.cs
- ListenerAdaptersInstallComponent.cs
- PopupRootAutomationPeer.cs
- TemplateBindingExtension.cs
- AutomationPatternInfo.cs
- RecordsAffectedEventArgs.cs
- Point3DIndependentAnimationStorage.cs
- ViewManager.cs
- StringDictionaryEditor.cs
- CompoundFileStorageReference.cs
- ConcurrentStack.cs
- NameObjectCollectionBase.cs
- XPathConvert.cs
- ActiveXContainer.cs
- DefaultTraceListener.cs
- HttpHandlerAction.cs
- StackBuilderSink.cs
- RuleInfoComparer.cs
- CatalogZone.cs
- DesignerHost.cs
- Merger.cs
- InternalPermissions.cs
- GradientStopCollection.cs
- KeyFrames.cs
- CompositeDataBoundControl.cs
- SafeArrayRankMismatchException.cs
- PermissionSetEnumerator.cs
- Sequence.cs
- Comparer.cs
- BitmapEncoder.cs
- RuleSettings.cs
- StructuredTypeEmitter.cs
- EntityConnectionStringBuilder.cs
- MarkupExtensionParser.cs
- XmlSchemaSimpleType.cs
- unitconverter.cs
- BindingOperations.cs
- DataConnectionHelper.cs
- Inflater.cs
- HostedElements.cs
- DesignerDataView.cs
- FixedBufferAttribute.cs
- CommonGetThemePartSize.cs
- DiscoveryUtility.cs
- PrePostDescendentsWalker.cs
- TimelineCollection.cs
- OleDbCommand.cs
- StyleXamlTreeBuilder.cs
- OdbcParameterCollection.cs
- MessageSecurityVersionConverter.cs
- RawMouseInputReport.cs
- ConnectionStringsExpressionBuilder.cs
- UnsafeCollabNativeMethods.cs
- PixelFormat.cs
- EntitySetDataBindingList.cs
- MenuItemStyleCollection.cs
- ImageList.cs
- SQLDecimalStorage.cs
- StopStoryboard.cs
- CompilerWrapper.cs
- TextStore.cs
- BaseCollection.cs
- Animatable.cs
- TraceContextEventArgs.cs
- Predicate.cs
- XmlCodeExporter.cs
- VisualStyleInformation.cs
- WorkflowView.cs
- ViewSimplifier.cs
- TableLayout.cs
- AsyncOperation.cs
- ConditionValidator.cs