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
- OracleInternalConnection.cs
- HtmlTableCell.cs
- XmlCharCheckingWriter.cs
- DocumentSequence.cs
- DropShadowBitmapEffect.cs
- TextDecoration.cs
- CodeAccessSecurityEngine.cs
- ResourceReader.cs
- PrivilegedConfigurationManager.cs
- MetadataCache.cs
- ClientScriptManagerWrapper.cs
- ReflectionTypeLoadException.cs
- PropertyFilterAttribute.cs
- ColorMatrix.cs
- SiteMap.cs
- StringDictionary.cs
- MimeFormatter.cs
- IIS7UserPrincipal.cs
- ActivityInstanceReference.cs
- HashHelper.cs
- MatrixTransform3D.cs
- AutomationPropertyInfo.cs
- SourceFileBuildProvider.cs
- TreeNodeStyleCollection.cs
- CodeIdentifier.cs
- Section.cs
- ITreeGenerator.cs
- VisualStyleTypesAndProperties.cs
- Polyline.cs
- PeerNameRecordCollection.cs
- TagNameToTypeMapper.cs
- Transform3D.cs
- DaylightTime.cs
- FileDialogCustomPlace.cs
- RoleService.cs
- GeneralTransform3DGroup.cs
- DataServiceProcessingPipeline.cs
- ScriptManager.cs
- InstanceContext.cs
- MenuItem.cs
- PageThemeBuildProvider.cs
- OpenTypeLayout.cs
- _LoggingObject.cs
- UIInitializationException.cs
- RightsManagementEncryptedStream.cs
- WorkflowPersistenceService.cs
- FileLogRecordStream.cs
- EnumerableCollectionView.cs
- CheckBoxStandardAdapter.cs
- GeometryValueSerializer.cs
- RootBuilder.cs
- TargetPerspective.cs
- MiniConstructorInfo.cs
- ZipPackagePart.cs
- UnmanagedBitmapWrapper.cs
- NetCodeGroup.cs
- Soap.cs
- XmlCharType.cs
- Utils.cs
- LogRestartAreaEnumerator.cs
- Screen.cs
- SendMessageRecord.cs
- OutputCacheSettings.cs
- CodeDomSerializer.cs
- PropertyChangedEventManager.cs
- XmlSchemaSimpleTypeList.cs
- fixedPageContentExtractor.cs
- DetailsViewPageEventArgs.cs
- PointCollection.cs
- Type.cs
- DomainLiteralReader.cs
- XmlHierarchicalDataSourceView.cs
- _NegoState.cs
- SchemaTableOptionalColumn.cs
- SoapInteropTypes.cs
- DeliveryStrategy.cs
- LineGeometry.cs
- HMACMD5.cs
- XsdDuration.cs
- OrderingQueryOperator.cs
- RecordsAffectedEventArgs.cs
- FilteredReadOnlyMetadataCollection.cs
- DiscoveryRequestHandler.cs
- WsdlExporter.cs
- IListConverters.cs
- UIElementAutomationPeer.cs
- HScrollBar.cs
- PixelShader.cs
- InheritanceUI.cs
- UserControlCodeDomTreeGenerator.cs
- Function.cs
- Activator.cs
- DataTableMappingCollection.cs
- XmlQueryType.cs
- DBAsyncResult.cs
- TemplatedMailWebEventProvider.cs
- DataGrid.cs
- SqlDataSourceCache.cs
- UrlAuthFailedErrorFormatter.cs
- CollectionViewGroupInternal.cs