Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Nullable.cs
- ResourceProviderFactory.cs
- TreeChangeInfo.cs
- TraceUtility.cs
- QuaternionIndependentAnimationStorage.cs
- UshortList2.cs
- RegexGroupCollection.cs
- X509WindowsSecurityToken.cs
- ResourceProviderFactory.cs
- DomainLiteralReader.cs
- WhitespaceRule.cs
- RelationshipEnd.cs
- XmlSerializerAssemblyAttribute.cs
- SqlTypesSchemaImporter.cs
- DataConnectionHelper.cs
- SamlNameIdentifierClaimResource.cs
- Matrix3D.cs
- ActivationServices.cs
- CollectionViewProxy.cs
- SqlCacheDependencyDatabase.cs
- XmlNodeList.cs
- ListCollectionView.cs
- FlowDocumentReaderAutomationPeer.cs
- OperatingSystem.cs
- ClientSponsor.cs
- SqlRowUpdatingEvent.cs
- CursorConverter.cs
- WebPartConnectionsCancelEventArgs.cs
- MD5Cng.cs
- PathFigureCollectionConverter.cs
- XmlSchemaNotation.cs
- _DigestClient.cs
- ColumnPropertiesGroup.cs
- DataGridViewRowEventArgs.cs
- WorkflowShape.cs
- FixedSOMLineRanges.cs
- SerializationAttributes.cs
- cookiecollection.cs
- OdbcConnectionString.cs
- CursorConverter.cs
- XmlElementAttributes.cs
- ThicknessConverter.cs
- Thumb.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DataGridColumnsPage.cs
- WizardStepBase.cs
- CornerRadius.cs
- AppDomainShutdownMonitor.cs
- DiscoveryClientRequestChannel.cs
- PropertyPathConverter.cs
- StorageMappingItemLoader.cs
- ComEventsSink.cs
- TextSelection.cs
- X509Chain.cs
- EventMappingSettings.cs
- ExecutedRoutedEventArgs.cs
- OleDbRowUpdatedEvent.cs
- OdbcInfoMessageEvent.cs
- Pen.cs
- Logging.cs
- ButtonFieldBase.cs
- GenericTransactionFlowAttribute.cs
- DbConnectionPoolGroupProviderInfo.cs
- DataGridViewBindingCompleteEventArgs.cs
- XmlSchemaObjectCollection.cs
- VersionedStreamOwner.cs
- XmlSchemaAnnotation.cs
- SqlDeflator.cs
- WebPartConnection.cs
- XmlNodeWriter.cs
- DataGridView.cs
- CultureTable.cs
- ResolvedKeyFrameEntry.cs
- Module.cs
- WebBrowserContainer.cs
- AdCreatedEventArgs.cs
- SecurityState.cs
- MasterPageBuildProvider.cs
- SByte.cs
- AsyncResult.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- PropertyStore.cs
- VisualProxy.cs
- listitem.cs
- ScrollData.cs
- Int64Converter.cs
- CLSCompliantAttribute.cs
- WebSysDefaultValueAttribute.cs
- GlobalEventManager.cs
- XmlArrayAttribute.cs
- Regex.cs
- DashStyle.cs
- PropertyManager.cs
- Evidence.cs
- CharAnimationBase.cs
- Semaphore.cs
- QuaternionAnimationUsingKeyFrames.cs
- UInt16Converter.cs
- AddingNewEventArgs.cs
- ListViewInsertEventArgs.cs