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
- StructuralObject.cs
- XmlWrappingReader.cs
- XmlException.cs
- AspNetHostingPermission.cs
- VisualStyleRenderer.cs
- TextViewElement.cs
- TextElementEditingBehaviorAttribute.cs
- NotifyIcon.cs
- DbConnectionOptions.cs
- RequestQueryProcessor.cs
- ExpressionsCollectionEditor.cs
- RelationshipNavigation.cs
- FileUtil.cs
- ObjectViewEntityCollectionData.cs
- ItemType.cs
- WebPartZoneCollection.cs
- RadioButton.cs
- log.cs
- jithelpers.cs
- SoapReflector.cs
- InputScopeConverter.cs
- ApplicationProxyInternal.cs
- KeyboardEventArgs.cs
- WhitespaceRuleLookup.cs
- ColorInterpolationModeValidation.cs
- PrintDialog.cs
- PropertyConverter.cs
- Menu.cs
- RegionIterator.cs
- SchemaInfo.cs
- CoTaskMemHandle.cs
- SqlNotificationRequest.cs
- DbConnectionFactory.cs
- UnmanagedMarshal.cs
- DataGridViewRowsAddedEventArgs.cs
- ResponseBodyWriter.cs
- cryptoapiTransform.cs
- WebBrowserNavigatingEventHandler.cs
- CompModSwitches.cs
- BamlCollectionHolder.cs
- HtmlInputImage.cs
- ItemCollection.cs
- LinkButton.cs
- InvalidAsynchronousStateException.cs
- CodeStatement.cs
- CommandExpr.cs
- InlineCollection.cs
- WizardStepBase.cs
- Token.cs
- GregorianCalendarHelper.cs
- IriParsingElement.cs
- BamlResourceSerializer.cs
- FileLoadException.cs
- SaveFileDialog.cs
- XamlRtfConverter.cs
- CatchDesigner.xaml.cs
- ClosureBinding.cs
- PersonalizationAdministration.cs
- GradientSpreadMethodValidation.cs
- DistributedTransactionPermission.cs
- SpellerError.cs
- XpsException.cs
- OrderedDictionary.cs
- BitmapCodecInfoInternal.cs
- EntityContainer.cs
- FixedSOMImage.cs
- ErrorTableItemStyle.cs
- SplitterCancelEvent.cs
- PrintDialog.cs
- ReferenceConverter.cs
- ConfigViewGenerator.cs
- FrameDimension.cs
- HttpCapabilitiesBase.cs
- CaseStatementSlot.cs
- ClientSettingsSection.cs
- FtpCachePolicyElement.cs
- ColorConvertedBitmapExtension.cs
- ConnectionConsumerAttribute.cs
- PageTheme.cs
- DecoderExceptionFallback.cs
- EntityDataSourceView.cs
- DummyDataSource.cs
- CompoundFileIOPermission.cs
- ActivationProxy.cs
- ProxyGenerationError.cs
- TypefaceCollection.cs
- CompilerGlobalScopeAttribute.cs
- XmlTypeMapping.cs
- CharacterShapingProperties.cs
- Char.cs
- ViewCellSlot.cs
- TokenBasedSetEnumerator.cs
- DataGridViewCellLinkedList.cs
- RadioButton.cs
- RuntimeArgumentHandle.cs
- TextComposition.cs
- StylusPointDescription.cs
- DbConnectionPoolCounters.cs
- SoapCodeExporter.cs
- SecurityContextTokenCache.cs