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
- ParseHttpDate.cs
- URI.cs
- BlockUIContainer.cs
- ISFClipboardData.cs
- HyperLinkField.cs
- ConnectionModeReader.cs
- RawStylusInputCustomDataList.cs
- GAC.cs
- DescendantBaseQuery.cs
- DefaultShape.cs
- ProtocolsConfiguration.cs
- WebResponse.cs
- DifferencingCollection.cs
- PrintDocument.cs
- ErrorFormatterPage.cs
- PasswordBoxAutomationPeer.cs
- InlineObject.cs
- AsymmetricAlgorithm.cs
- Tokenizer.cs
- MarshalByRefObject.cs
- CustomErrorsSection.cs
- Preprocessor.cs
- MailHeaderInfo.cs
- UIElement.cs
- Events.cs
- DocumentViewerBaseAutomationPeer.cs
- DBConnectionString.cs
- Viewport2DVisual3D.cs
- ButtonBaseDesigner.cs
- OpCodes.cs
- PerformanceCounterManager.cs
- ServiceMemoryGates.cs
- DesignerForm.cs
- RootNamespaceAttribute.cs
- DbProviderSpecificTypePropertyAttribute.cs
- DataListCommandEventArgs.cs
- DataPagerFieldCollection.cs
- ITextView.cs
- DescendentsWalker.cs
- CompilerScopeManager.cs
- unsafenativemethodsother.cs
- DiagnosticsConfigurationHandler.cs
- ResourceReferenceExpression.cs
- mediapermission.cs
- SqlDeflator.cs
- CustomErrorCollection.cs
- MdImport.cs
- DefaultClaimSet.cs
- InstalledFontCollection.cs
- AnimationClockResource.cs
- dtdvalidator.cs
- SqlPersonalizationProvider.cs
- EncodingTable.cs
- XmlSerializationWriter.cs
- UrlMappingCollection.cs
- Vector3D.cs
- EffectiveValueEntry.cs
- smtppermission.cs
- NamespaceMapping.cs
- SerialPort.cs
- DataGridViewColumnCollection.cs
- ClassHandlersStore.cs
- LightweightCodeGenerator.cs
- arc.cs
- Win32Native.cs
- ReadOnlyTernaryTree.cs
- PropertyValueUIItem.cs
- GeneralTransformGroup.cs
- DocumentStatusResources.cs
- DataTableMapping.cs
- CodePageUtils.cs
- LoginName.cs
- SingleAnimationBase.cs
- FolderBrowserDialog.cs
- UserControl.cs
- TagPrefixInfo.cs
- DesignerSerializationManager.cs
- Helpers.cs
- PerformanceCounterPermissionAttribute.cs
- Int64Storage.cs
- future.cs
- ConditionCollection.cs
- WindowsFont.cs
- ClientConvert.cs
- OledbConnectionStringbuilder.cs
- ContainerUtilities.cs
- DefaultValueAttribute.cs
- TextBox.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SubstitutionDesigner.cs
- EventProviderWriter.cs
- IgnoreSectionHandler.cs
- DesignerAutoFormatCollection.cs
- CharStorage.cs
- ControlAdapter.cs
- sqlstateclientmanager.cs
- InvalidFilterCriteriaException.cs
- UnauthorizedAccessException.cs
- SqlFacetAttribute.cs
- DigitalSignature.cs