Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- EntityDataSourceReferenceGroup.cs
- SQLGuid.cs
- WindowsIPAddress.cs
- XmlSchemaExporter.cs
- SqlDataRecord.cs
- SqlInternalConnectionSmi.cs
- PreservationFileReader.cs
- Pair.cs
- Assert.cs
- TagMapInfo.cs
- LinqDataSourceHelper.cs
- PrintPageEvent.cs
- OpacityConverter.cs
- WebPartMenu.cs
- DefaultBinder.cs
- NodeLabelEditEvent.cs
- EditorPart.cs
- EntityFunctions.cs
- UInt16.cs
- ObjectNotFoundException.cs
- TemplatePartAttribute.cs
- TextInfo.cs
- LiteralControl.cs
- AuthenticationModuleElementCollection.cs
- SpoolingTask.cs
- BitHelper.cs
- CompositionAdorner.cs
- XmlSchemaGroupRef.cs
- TextSelectionHelper.cs
- GestureRecognitionResult.cs
- EditorPartChrome.cs
- State.cs
- EntityParameterCollection.cs
- AssemblyAssociatedContentFileAttribute.cs
- DataGridViewImageColumn.cs
- DetailsViewPagerRow.cs
- HtmlCalendarAdapter.cs
- TableItemProviderWrapper.cs
- ParseElementCollection.cs
- ControlIdConverter.cs
- RelatedEnd.cs
- PersistChildrenAttribute.cs
- Hashtable.cs
- ChtmlTextBoxAdapter.cs
- CryptoKeySecurity.cs
- StaticResourceExtension.cs
- _ListenerAsyncResult.cs
- TransformGroup.cs
- ObjectIDGenerator.cs
- KeyTime.cs
- DashStyle.cs
- GZipStream.cs
- DeviceContext2.cs
- RootAction.cs
- FileVersion.cs
- DataObjectCopyingEventArgs.cs
- RootDesignerSerializerAttribute.cs
- GridItem.cs
- SqlTrackingQuery.cs
- Container.cs
- PasswordTextContainer.cs
- Serializer.cs
- controlskin.cs
- ClientApiGenerator.cs
- DbConnectionClosed.cs
- XmlConvert.cs
- XmlSchemaSequence.cs
- ComEventsSink.cs
- HtmlTableRowCollection.cs
- SurrogateSelector.cs
- wmiutil.cs
- DrawingVisualDrawingContext.cs
- WindowProviderWrapper.cs
- DataRelation.cs
- UnsafeMethods.cs
- MethodBuilderInstantiation.cs
- DataStreams.cs
- TrustManager.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- xmlsaver.cs
- XmlSignatureProperties.cs
- ControlPropertyNameConverter.cs
- DebugView.cs
- SpellerHighlightLayer.cs
- Vector3DCollectionConverter.cs
- ConfigurationLocation.cs
- HttpModuleActionCollection.cs
- TextElementCollection.cs
- ReferenceEqualityComparer.cs
- FontConverter.cs
- SiteMapSection.cs
- Module.cs
- SslStream.cs
- Utility.cs
- DbInsertCommandTree.cs
- documentation.cs
- TreeViewBindingsEditorForm.cs
- Path.cs
- ProcessProtocolHandler.cs
- MediaPlayerState.cs