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
- DataGridViewRowPostPaintEventArgs.cs
- RemotingServices.cs
- ProfileModule.cs
- Int64Storage.cs
- Rotation3DAnimation.cs
- Internal.cs
- HtmlHistory.cs
- Misc.cs
- Color.cs
- ProcessProtocolHandler.cs
- DiagnosticsConfigurationHandler.cs
- HierarchicalDataBoundControl.cs
- XhtmlBasicTextBoxAdapter.cs
- IBuiltInEvidence.cs
- Pts.cs
- FormatException.cs
- LambdaCompiler.Unary.cs
- PlainXmlWriter.cs
- SelectedGridItemChangedEvent.cs
- CharKeyFrameCollection.cs
- PolyLineSegment.cs
- CqlParserHelpers.cs
- Math.cs
- SqlRowUpdatingEvent.cs
- XPathSelectionIterator.cs
- DataBindingExpressionBuilder.cs
- RelativeSource.cs
- DirectoryInfo.cs
- OutKeywords.cs
- WorkflowRuntimeServicesBehavior.cs
- RoutedEventValueSerializer.cs
- ChangeDirector.cs
- LocalizabilityAttribute.cs
- GraphicsContext.cs
- SystemColorTracker.cs
- LoginView.cs
- PasswordTextNavigator.cs
- Publisher.cs
- DbConnectionOptions.cs
- PiiTraceSource.cs
- GetImportedCardRequest.cs
- MailAddress.cs
- Buffer.cs
- TextComposition.cs
- _AutoWebProxyScriptWrapper.cs
- GcSettings.cs
- HelpEvent.cs
- DetailsViewRow.cs
- CssStyleCollection.cs
- GlobalProxySelection.cs
- IpcPort.cs
- ServiceControllerDesigner.cs
- WizardStepBase.cs
- XmlBindingWorker.cs
- BitVector32.cs
- RegexReplacement.cs
- EntityClientCacheEntry.cs
- AppDomainAttributes.cs
- TabPage.cs
- BitmapMetadataBlob.cs
- JobCollate.cs
- backend.cs
- PaperSize.cs
- Border.cs
- DefinitionUpdate.cs
- EditCommandColumn.cs
- SyncOperationState.cs
- OleDbStruct.cs
- NodeLabelEditEvent.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- SymbolMethod.cs
- CrossAppDomainChannel.cs
- DataKeyCollection.cs
- PropertyDescriptor.cs
- TypefaceCollection.cs
- WebResponse.cs
- ObjectPersistData.cs
- SQLGuidStorage.cs
- Matrix3DStack.cs
- PropertyGroupDescription.cs
- Set.cs
- NamespaceDisplayAutomationPeer.cs
- Types.cs
- WebPartEditorOkVerb.cs
- XPathCompileException.cs
- ButtonDesigner.cs
- MDIClient.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- DataGridViewCellCancelEventArgs.cs
- XmlLanguageConverter.cs
- TimeZone.cs
- ContentPlaceHolder.cs
- BindingNavigator.cs
- AuthenticatedStream.cs
- GuidelineSet.cs
- CodeTypeDeclarationCollection.cs
- QuadraticBezierSegment.cs
- WindowsSlider.cs
- PaperSource.cs
- SqlException.cs