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
- AuthenticodeSignatureInformation.cs
- SharedConnectionListener.cs
- SchemaImporterExtensionsSection.cs
- TabItemWrapperAutomationPeer.cs
- NullableFloatAverageAggregationOperator.cs
- NamespaceExpr.cs
- HandlerMappingMemo.cs
- UnsafeNativeMethods.cs
- MethodBody.cs
- XmlEncoding.cs
- CommonDialog.cs
- _OverlappedAsyncResult.cs
- DataListItem.cs
- XComponentModel.cs
- PerformanceCounter.cs
- baseshape.cs
- Int64KeyFrameCollection.cs
- AssemblyAttributes.cs
- ConsumerConnectionPointCollection.cs
- CommonXSendMessage.cs
- StateElementCollection.cs
- base64Transforms.cs
- TypeHelper.cs
- WebConfigurationManager.cs
- BookmarkList.cs
- InputBindingCollection.cs
- controlskin.cs
- Error.cs
- DBSchemaTable.cs
- DbDataRecord.cs
- CallbackHandler.cs
- DirectoryLocalQuery.cs
- XmlLoader.cs
- ObjectReaderCompiler.cs
- Matrix.cs
- KerberosRequestorSecurityToken.cs
- OdbcParameter.cs
- XmlParserContext.cs
- SettingsAttributes.cs
- ColumnClickEvent.cs
- EntityContainerEmitter.cs
- UnmanagedMemoryStreamWrapper.cs
- localization.cs
- ConfigXmlComment.cs
- DrawingVisualDrawingContext.cs
- CssClassPropertyAttribute.cs
- X509CertificateCollection.cs
- FontUnitConverter.cs
- Label.cs
- AsyncDataRequest.cs
- IWorkflowDebuggerService.cs
- ControlParameter.cs
- GlyphingCache.cs
- XmlMembersMapping.cs
- URLEditor.cs
- NotFiniteNumberException.cs
- ErrorEventArgs.cs
- DataReceivedEventArgs.cs
- SoapTypeAttribute.cs
- Rect3D.cs
- ItemChangedEventArgs.cs
- JulianCalendar.cs
- RepeatButton.cs
- AncestorChangedEventArgs.cs
- CircleHotSpot.cs
- OrCondition.cs
- FormatPage.cs
- MailAddress.cs
- MessageQueuePermissionEntryCollection.cs
- _BaseOverlappedAsyncResult.cs
- RemotingSurrogateSelector.cs
- NestPullup.cs
- ListViewItem.cs
- BoundPropertyEntry.cs
- DesignerOptions.cs
- TrimSurroundingWhitespaceAttribute.cs
- WebPageTraceListener.cs
- GridViewRowPresenterBase.cs
- ExpressionNode.cs
- CollectionChange.cs
- ILGenerator.cs
- AppDomainResourcePerfCounters.cs
- ObjectView.cs
- ExtensionWindowHeader.cs
- TimelineGroup.cs
- FileLogRecordStream.cs
- SafeEventLogReadHandle.cs
- BuildResult.cs
- RtType.cs
- Int32Animation.cs
- CreateBookmarkScope.cs
- DataGridViewColumnCollection.cs
- BufferAllocator.cs
- Fault.cs
- TreeNodeBindingCollection.cs
- DocumentApplicationJournalEntry.cs
- SafeHandles.cs
- HttpErrorTraceRecord.cs
- NamespaceInfo.cs
- ReturnType.cs