Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / LoadedOrUnloadedOperation.cs / 1305600 / LoadedOrUnloadedOperation.cs
//------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // A pending loaded or unloaded operation, to be run by the MediaContext. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; // Debug.Assert using System.Windows; // DependencyObject using System.Windows.Threading; // DispatcherOperationCallback using MS.Internal.PresentationCore; // [FriendAccessAllowed] namespace MS.Internal { [FriendAccessAllowed] // Built into Core, also used by Framework. internal class LoadedOrUnloadedOperation { internal LoadedOrUnloadedOperation( DispatcherOperationCallback callback, DependencyObject target) { Debug.Assert(callback != null && target != null); _callback = callback; _target = target; } internal void DoWork() { if (!_cancelled) { _callback(_target); } } internal void Cancel() { _cancelled = true; } private DispatcherOperationCallback _callback; private DependencyObject _target; private bool _cancelled; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // A pending loaded or unloaded operation, to be run by the MediaContext. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; // Debug.Assert using System.Windows; // DependencyObject using System.Windows.Threading; // DispatcherOperationCallback using MS.Internal.PresentationCore; // [FriendAccessAllowed] namespace MS.Internal { [FriendAccessAllowed] // Built into Core, also used by Framework. internal class LoadedOrUnloadedOperation { internal LoadedOrUnloadedOperation( DispatcherOperationCallback callback, DependencyObject target) { Debug.Assert(callback != null && target != null); _callback = callback; _target = target; } internal void DoWork() { if (!_cancelled) { _callback(_target); } } internal void Cancel() { _cancelled = true; } private DispatcherOperationCallback _callback; private DependencyObject _target; private bool _cancelled; } } // 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
- ModelToObjectValueConverter.cs
- HwndProxyElementProvider.cs
- DataGridViewRowConverter.cs
- ToolStripDropDownItemDesigner.cs
- GridItemCollection.cs
- SqlClientPermission.cs
- NavigationService.cs
- WebWorkflowRole.cs
- TypeResolvingOptionsAttribute.cs
- Encoder.cs
- _UriTypeConverter.cs
- BitmapMetadataEnumerator.cs
- XLinq.cs
- EnumDataContract.cs
- ConditionalDesigner.cs
- ToolStripPanelRenderEventArgs.cs
- Decimal.cs
- PenCursorManager.cs
- GridPattern.cs
- MetadataCache.cs
- Block.cs
- DetailsViewPagerRow.cs
- AsyncOperation.cs
- ContentElement.cs
- StylusPointProperty.cs
- ToolBarButtonClickEvent.cs
- StrokeCollectionConverter.cs
- TableRowCollection.cs
- SqlClientFactory.cs
- ProxyOperationRuntime.cs
- ConfigPathUtility.cs
- SmiMetaDataProperty.cs
- AnimationClockResource.cs
- ContourSegment.cs
- ObjectContext.cs
- ToolStripPanelRow.cs
- Pkcs7Signer.cs
- HostingEnvironment.cs
- ComponentChangedEvent.cs
- ListManagerBindingsCollection.cs
- PropertyChangeTracker.cs
- SerializableReadOnlyDictionary.cs
- dtdvalidator.cs
- DataGridViewUtilities.cs
- HtmlTextArea.cs
- ZipIOExtraFieldElement.cs
- SoapIncludeAttribute.cs
- ServiceXNameTypeConverter.cs
- GridViewRowPresenterBase.cs
- TargetException.cs
- DictionaryChange.cs
- XPathNavigatorReader.cs
- AssemblyBuilderData.cs
- AnimatedTypeHelpers.cs
- LicenseProviderAttribute.cs
- DelegatingHeader.cs
- TextBoxAutoCompleteSourceConverter.cs
- KeyManager.cs
- SyntaxCheck.cs
- TreeNodeBinding.cs
- EntitySqlException.cs
- XPathMultyIterator.cs
- OracleBoolean.cs
- HttpChannelListener.cs
- UnmanagedBitmapWrapper.cs
- ColumnMapCopier.cs
- RangeBaseAutomationPeer.cs
- DynamicRenderer.cs
- PaperSource.cs
- ContentTextAutomationPeer.cs
- RSAOAEPKeyExchangeDeformatter.cs
- Region.cs
- ProcessModuleCollection.cs
- PTProvider.cs
- ObjectDataSourceMethodEventArgs.cs
- RuleSettings.cs
- MtomMessageEncoder.cs
- RenderDataDrawingContext.cs
- HostVisual.cs
- RichTextBox.cs
- IntSecurity.cs
- FileSystemInfo.cs
- IgnoreFlushAndCloseStream.cs
- EntityObject.cs
- XhtmlConformanceSection.cs
- DbMetaDataColumnNames.cs
- RegionInfo.cs
- AttachmentService.cs
- SchemaType.cs
- SecurityDocument.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- ToolStripGripRenderEventArgs.cs
- CompilationPass2TaskInternal.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- PriorityQueue.cs
- ToolStripOverflow.cs
- ApplicationSecurityManager.cs
- _Win32.cs
- Match.cs
- UniqueSet.cs