Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DictionarySectionHandler.cs
- DataBindingCollection.cs
- NameValuePermission.cs
- DateTimeConverter.cs
- CellIdBoolean.cs
- SystemSounds.cs
- SmiGettersStream.cs
- RequestNavigateEventArgs.cs
- IndicFontClient.cs
- ControlBuilder.cs
- ExpandableObjectConverter.cs
- VoiceObjectToken.cs
- ContentType.cs
- PathData.cs
- AnonymousIdentificationSection.cs
- TextureBrush.cs
- TCPListener.cs
- CharUnicodeInfo.cs
- TableCellAutomationPeer.cs
- StrongNameMembershipCondition.cs
- XmlSchema.cs
- RemotingServices.cs
- X509Extension.cs
- NavigationWindow.cs
- EditorZone.cs
- EmbeddedObject.cs
- InstanceCreationEditor.cs
- ToolStripSettings.cs
- DoubleIndependentAnimationStorage.cs
- LayoutDump.cs
- UpdatePanelTrigger.cs
- IncrementalReadDecoders.cs
- UniformGrid.cs
- DataControlFieldCollection.cs
- ObjectSpanRewriter.cs
- PermissionAttributes.cs
- RequiredFieldValidator.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- PropertyKey.cs
- ReferenceSchema.cs
- OperatingSystem.cs
- EnglishPluralizationService.cs
- MergablePropertyAttribute.cs
- SessionEndingEventArgs.cs
- IntPtr.cs
- InputQueueChannelAcceptor.cs
- Line.cs
- ProtectedConfigurationSection.cs
- TextLine.cs
- ProviderSettings.cs
- QilInvokeLateBound.cs
- MobileListItem.cs
- ServiceDescriptionImporter.cs
- SqlCacheDependencySection.cs
- OracleCommandSet.cs
- Drawing.cs
- AsyncOperationManager.cs
- SupportingTokenAuthenticatorSpecification.cs
- UseAttributeSetsAction.cs
- ToolStripItemTextRenderEventArgs.cs
- DataDocumentXPathNavigator.cs
- SmiMetaDataProperty.cs
- MetadataCollection.cs
- NamespaceDecl.cs
- DeclaredTypeElementCollection.cs
- SspiSafeHandles.cs
- InitializationEventAttribute.cs
- DBConnection.cs
- _SslStream.cs
- ContractSearchPattern.cs
- ReadOnlyCollection.cs
- LinkedList.cs
- BaseValidatorDesigner.cs
- HostSecurityManager.cs
- DataGridViewCellParsingEventArgs.cs
- Enum.cs
- GatewayDefinition.cs
- ProxyAttribute.cs
- EventToken.cs
- BuildProvidersCompiler.cs
- WebCategoryAttribute.cs
- SystemNetHelpers.cs
- ProvidePropertyAttribute.cs
- IPCCacheManager.cs
- DebuggerAttributes.cs
- TransactionManagerProxy.cs
- DataGridTextBoxColumn.cs
- UpdateTranslator.cs
- WebPartVerbCollection.cs
- SpellCheck.cs
- AutoGeneratedField.cs
- ResetableIterator.cs
- NumericExpr.cs
- TextBoxAutomationPeer.cs
- TemplateContentLoader.cs
- TreeNode.cs
- TCPListener.cs
- RepeatInfo.cs
- BStrWrapper.cs
- ContentFileHelper.cs