Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / MS / Internal / LoadedOrUnloadedOperation.cs / 1 / 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
- BitmapSource.cs
- TextRangeSerialization.cs
- QilLoop.cs
- CompareValidator.cs
- StringBuilder.cs
- SecurityUniqueId.cs
- MemoryFailPoint.cs
- WebServiceResponseDesigner.cs
- ControlBuilder.cs
- DataGridViewRowCancelEventArgs.cs
- NotifyIcon.cs
- TargetParameterCountException.cs
- PolicyLevel.cs
- SchemaTableColumn.cs
- ProfileGroupSettingsCollection.cs
- TempFiles.cs
- FacetDescription.cs
- SystemNetworkInterface.cs
- HtmlHead.cs
- COM2IDispatchConverter.cs
- MergePropertyDescriptor.cs
- GraphicsState.cs
- XmlAttributes.cs
- XmlUtilWriter.cs
- EntityDataSourceDesigner.cs
- EncryptedPackageFilter.cs
- HashCodeCombiner.cs
- WindowsGrip.cs
- TTSVoice.cs
- DataServiceOperationContext.cs
- TextSegment.cs
- EncoderParameters.cs
- CompilationUtil.cs
- RSAPKCS1KeyExchangeFormatter.cs
- StreamInfo.cs
- PageTheme.cs
- Substitution.cs
- CachedCompositeFamily.cs
- UnmanagedBitmapWrapper.cs
- BreakRecordTable.cs
- ListItemsPage.cs
- BoundField.cs
- LicenseException.cs
- DataGridColumnHeadersPresenter.cs
- BoolExpressionVisitors.cs
- RtfToXamlLexer.cs
- ImageAnimator.cs
- DrawListViewSubItemEventArgs.cs
- PrtCap_Public.cs
- UserControlCodeDomTreeGenerator.cs
- SchemaElementDecl.cs
- ExtendedProtectionPolicyElement.cs
- DesignTimeXamlWriter.cs
- FtpCachePolicyElement.cs
- GroupBoxRenderer.cs
- RootCodeDomSerializer.cs
- PrePostDescendentsWalker.cs
- RuntimeHelpers.cs
- SequentialWorkflowRootDesigner.cs
- DomNameTable.cs
- DataGridTablesFactory.cs
- ListSourceHelper.cs
- ToolStripManager.cs
- MimeMultiPart.cs
- StrokeRenderer.cs
- MappingItemCollection.cs
- DesignRelationCollection.cs
- SqlCharStream.cs
- JsonReader.cs
- BufferBuilder.cs
- SequentialUshortCollection.cs
- FormsAuthenticationUser.cs
- StatusBarItemAutomationPeer.cs
- GenericEnumerator.cs
- AbstractSvcMapFileLoader.cs
- RawStylusSystemGestureInputReport.cs
- TextBreakpoint.cs
- SoapFormatter.cs
- securitycriticaldata.cs
- XamlBrushSerializer.cs
- FileDialog_Vista.cs
- CodePageUtils.cs
- DSACryptoServiceProvider.cs
- SignatureDescription.cs
- PrintDialogException.cs
- SafeMemoryMappedViewHandle.cs
- QuadraticBezierSegment.cs
- ImageSourceValueSerializer.cs
- Attributes.cs
- WebPartExportVerb.cs
- ContextDataSourceView.cs
- MappingMetadataHelper.cs
- ControlCommandSet.cs
- TreeNode.cs
- GlobalProxySelection.cs
- LayoutEditorPart.cs
- HtmlDocument.cs
- FileNotFoundException.cs
- activationcontext.cs
- XmlNodeChangedEventArgs.cs