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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeRegionDirective.cs
- IconBitmapDecoder.cs
- ListView.cs
- ChooseAction.cs
- SpecularMaterial.cs
- EventLogPermissionEntryCollection.cs
- TextProperties.cs
- RenderCapability.cs
- WebBrowserNavigatedEventHandler.cs
- Region.cs
- HttpPostedFile.cs
- StagingAreaInputItem.cs
- _HeaderInfoTable.cs
- ObsoleteAttribute.cs
- entityreference_tresulttype.cs
- EncoderReplacementFallback.cs
- LOSFormatter.cs
- MenuScrollingVisibilityConverter.cs
- odbcmetadatafactory.cs
- BindingNavigator.cs
- XPathExpr.cs
- DataGridCellInfo.cs
- NamedPermissionSet.cs
- DataSourceConverter.cs
- TypedTableBase.cs
- MessageContractExporter.cs
- RegexInterpreter.cs
- ViewManager.cs
- PropertyGridDesigner.cs
- DefaultPerformanceCounters.cs
- TargetConverter.cs
- KeyedHashAlgorithm.cs
- BufferCache.cs
- TextParagraphView.cs
- AddressUtility.cs
- HtmlTextBoxAdapter.cs
- ToolStripTextBox.cs
- UnmanagedHandle.cs
- HighlightVisual.cs
- EmptyControlCollection.cs
- SerialErrors.cs
- BitmapSource.cs
- DebuggerAttributes.cs
- TabItemWrapperAutomationPeer.cs
- Image.cs
- InputBindingCollection.cs
- NonVisualControlAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- EDesignUtil.cs
- SmiContext.cs
- MessageOperationFormatter.cs
- SweepDirectionValidation.cs
- Parser.cs
- TypeSystem.cs
- ListControl.cs
- SqlWriter.cs
- ClientCultureInfo.cs
- CollectionsUtil.cs
- WizardStepBase.cs
- RegisteredDisposeScript.cs
- DocumentSchemaValidator.cs
- BorderGapMaskConverter.cs
- hresults.cs
- DataMemberConverter.cs
- PropertyTabAttribute.cs
- XmlDataProvider.cs
- DifferencingCollection.cs
- SweepDirectionValidation.cs
- WeakEventTable.cs
- MembershipUser.cs
- ReferentialConstraintRoleElement.cs
- ItemCheckedEvent.cs
- TableStyle.cs
- CompoundFileStorageReference.cs
- IpcServerChannel.cs
- DrawingBrush.cs
- EngineSite.cs
- DESCryptoServiceProvider.cs
- ButtonFlatAdapter.cs
- TogglePatternIdentifiers.cs
- WindowsServiceCredential.cs
- TemplateFactory.cs
- TextRenderer.cs
- SettingsSavedEventArgs.cs
- WebPartManager.cs
- controlskin.cs
- Operators.cs
- ThreadStaticAttribute.cs
- QilExpression.cs
- Util.cs
- RegexWriter.cs
- VisualBasicHelper.cs
- xdrvalidator.cs
- TreeNodeStyleCollection.cs
- HandlerBase.cs
- DashStyle.cs
- PropVariant.cs
- ModifiableIteratorCollection.cs
- CmsInterop.cs
- SingletonInstanceContextProvider.cs