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
- DataSourceXmlSerializer.cs
- LiteralSubsegment.cs
- ITreeGenerator.cs
- PermissionSetTriple.cs
- CodeCatchClause.cs
- RowUpdatedEventArgs.cs
- ClosableStream.cs
- MimeParameter.cs
- BaseParagraph.cs
- GridItemCollection.cs
- StylusPointDescription.cs
- DataGridCellEditEndingEventArgs.cs
- AmbientProperties.cs
- BooleanStorage.cs
- SoapProtocolReflector.cs
- RegionInfo.cs
- HttpWebResponse.cs
- LockingPersistenceProvider.cs
- CreateUserWizardStep.cs
- XmlDocumentFragment.cs
- WebBrowsableAttribute.cs
- Brush.cs
- StreamWriter.cs
- DesignerActionVerbItem.cs
- JapaneseLunisolarCalendar.cs
- RepeaterItemCollection.cs
- LookupNode.cs
- HorizontalAlignConverter.cs
- TextPenaltyModule.cs
- OuterGlowBitmapEffect.cs
- SoapFault.cs
- TickBar.cs
- WindowsComboBox.cs
- DummyDataSource.cs
- CellQuery.cs
- DateTimeValueSerializerContext.cs
- SQLDecimalStorage.cs
- DecimalConstantAttribute.cs
- HtmlInputSubmit.cs
- ContentValidator.cs
- SpellerInterop.cs
- ContentOperations.cs
- Char.cs
- StrokeNodeEnumerator.cs
- FileLoadException.cs
- CompatibleComparer.cs
- DPCustomTypeDescriptor.cs
- IfJoinedCondition.cs
- MatchingStyle.cs
- BrushMappingModeValidation.cs
- CompiledRegexRunner.cs
- VersionConverter.cs
- _Events.cs
- WindowCollection.cs
- KeyInstance.cs
- Binding.cs
- Cell.cs
- XmlArrayItemAttribute.cs
- GreenMethods.cs
- StateWorkerRequest.cs
- HtmlControlPersistable.cs
- CSharpCodeProvider.cs
- PageSettings.cs
- OleDbTransaction.cs
- DropShadowBitmapEffect.cs
- AbsoluteQuery.cs
- HttpHandlerAction.cs
- SpeechDetectedEventArgs.cs
- TraceFilter.cs
- TypeConverterAttribute.cs
- DataGridViewCellConverter.cs
- ColorContextHelper.cs
- StringArrayConverter.cs
- InputLanguageEventArgs.cs
- MethodMessage.cs
- Stacktrace.cs
- Timeline.cs
- WebPartConnectionsCancelVerb.cs
- DocumentPageTextView.cs
- FormViewCommandEventArgs.cs
- EnglishPluralizationService.cs
- NativeCppClassAttribute.cs
- HwndKeyboardInputProvider.cs
- StorageInfo.cs
- ColumnMapTranslator.cs
- AttachedAnnotationChangedEventArgs.cs
- FileDataSourceCache.cs
- DelegatingConfigHost.cs
- XhtmlBasicCommandAdapter.cs
- PlanCompiler.cs
- CodeLinePragma.cs
- Range.cs
- ActivityStatusChangeEventArgs.cs
- PartDesigner.cs
- regiisutil.cs
- MergeFilterQuery.cs
- ComplexBindingPropertiesAttribute.cs
- ComplusEndpointConfigContainer.cs
- EditingCoordinator.cs
- FactoryRecord.cs