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
- IndexOutOfRangeException.cs
- LocationUpdates.cs
- ReverseInheritProperty.cs
- FontWeightConverter.cs
- xamlnodes.cs
- ConsumerConnectionPointCollection.cs
- WindowsFormsHost.cs
- ClientRolePrincipal.cs
- SQLInt64.cs
- ConfigsHelper.cs
- DataServiceRequestException.cs
- DesignerForm.cs
- WindowsStreamSecurityBindingElement.cs
- StorageEntitySetMapping.cs
- FunctionParameter.cs
- SetIterators.cs
- RefExpr.cs
- AliasedSlot.cs
- DocumentXPathNavigator.cs
- NodeFunctions.cs
- DispatchChannelSink.cs
- XPathSelfQuery.cs
- SerializationInfo.cs
- Int32.cs
- X509PeerCertificateElement.cs
- ReadWriteObjectLock.cs
- SelectionEditingBehavior.cs
- SerialErrors.cs
- ControlDesigner.cs
- BoundsDrawingContextWalker.cs
- ListViewTableRow.cs
- AttributeSetAction.cs
- Attachment.cs
- AsyncResult.cs
- HtmlShim.cs
- CompilationUnit.cs
- Native.cs
- IntegerValidator.cs
- CacheForPrimitiveTypes.cs
- ComplexPropertyEntry.cs
- RadioButtonAutomationPeer.cs
- WebPartZoneBase.cs
- DataGridColumnCollection.cs
- XamlTreeBuilder.cs
- EntityDataSourceDesignerHelper.cs
- ValidationRuleCollection.cs
- HostedController.cs
- WebServiceClientProxyGenerator.cs
- DeviceFilterEditorDialog.cs
- ClientFormsIdentity.cs
- Frame.cs
- NotImplementedException.cs
- BaseConfigurationRecord.cs
- BamlWriter.cs
- TreeBuilder.cs
- DragDrop.cs
- CipherData.cs
- TransactionManager.cs
- TransformerInfo.cs
- JavaScriptSerializer.cs
- FilterEventArgs.cs
- XsdDateTime.cs
- DataGridViewControlCollection.cs
- NetworkInterface.cs
- ProgressBar.cs
- MimeParameters.cs
- regiisutil.cs
- BindingSource.cs
- SpeechRecognizer.cs
- BitmapScalingModeValidation.cs
- CurrencyWrapper.cs
- PenContexts.cs
- IApplicationTrustManager.cs
- Camera.cs
- NetworkInformationPermission.cs
- MouseButton.cs
- ComNativeDescriptor.cs
- OleDbError.cs
- KeyEventArgs.cs
- PointAnimationBase.cs
- ValidationError.cs
- ConfigurationManagerInternalFactory.cs
- ConnectionAcceptor.cs
- StandardToolWindows.cs
- BuildManagerHost.cs
- UnwrappedTypesXmlSerializerManager.cs
- Nodes.cs
- ObjectQueryState.cs
- TreeNodeSelectionProcessor.cs
- ItemCheckEvent.cs
- ConfigXmlSignificantWhitespace.cs
- AnimatedTypeHelpers.cs
- BamlBinaryReader.cs
- ManagementInstaller.cs
- StringExpressionSet.cs
- ChtmlFormAdapter.cs
- DataGridCellsPresenter.cs
- SharedPerformanceCounter.cs
- CodeCommentStatementCollection.cs
- TempFiles.cs