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
- AudioException.cs
- DataSourceCache.cs
- DoubleStorage.cs
- Decimal.cs
- XmlDomTextWriter.cs
- FragmentQueryKB.cs
- MappingException.cs
- TransformDescriptor.cs
- FilterableAttribute.cs
- Types.cs
- Int32RectValueSerializer.cs
- XmlQueryStaticData.cs
- MtomMessageEncoder.cs
- COM2ComponentEditor.cs
- dtdvalidator.cs
- WebPartConnectionsDisconnectVerb.cs
- XmlSchemaSimpleTypeList.cs
- HtmlButton.cs
- TreeNodeConverter.cs
- SelectionListDesigner.cs
- StreamUpgradeProvider.cs
- SoapServerProtocol.cs
- MasterPageBuildProvider.cs
- SoapObjectWriter.cs
- HostedHttpTransportManager.cs
- GPPOINT.cs
- TagMapCollection.cs
- MenuItem.cs
- MasterPageParser.cs
- ILGenerator.cs
- CurrencyManager.cs
- XmlWriterTraceListener.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- DbgUtil.cs
- Oci.cs
- OracleConnection.cs
- ScriptingSectionGroup.cs
- Mutex.cs
- TraceLevelHelper.cs
- DocumentPageTextView.cs
- TablePattern.cs
- ListViewItem.cs
- DataSourceSelectArguments.cs
- TemplateControlCodeDomTreeGenerator.cs
- GridViewEditEventArgs.cs
- OleDbError.cs
- DbgCompiler.cs
- TimeSpanValidatorAttribute.cs
- Propagator.ExtentPlaceholderCreator.cs
- RawAppCommandInputReport.cs
- UndirectedGraph.cs
- FrameworkContentElement.cs
- Bits.cs
- indexingfiltermarshaler.cs
- ConfigurationSectionGroupCollection.cs
- MetadataItem_Static.cs
- MarkupProperty.cs
- SignatureDescription.cs
- PeerContact.cs
- DrawingContext.cs
- ConfigPathUtility.cs
- FastEncoderWindow.cs
- __FastResourceComparer.cs
- NativeRightsManagementAPIsStructures.cs
- QilName.cs
- SelectionChangedEventArgs.cs
- TransportContext.cs
- ConfigXmlComment.cs
- WebHeaderCollection.cs
- PageWrapper.cs
- jithelpers.cs
- EntityDataSourceEntityTypeFilterItem.cs
- UTF8Encoding.cs
- Message.cs
- HttpServerVarsCollection.cs
- CacheMemory.cs
- NameObjectCollectionBase.cs
- DocumentPageHost.cs
- DesignerTransactionCloseEvent.cs
- SimpleType.cs
- Win32SafeHandles.cs
- ResourceExpression.cs
- RelOps.cs
- WebEventCodes.cs
- DrawTreeNodeEventArgs.cs
- BitmapCodecInfoInternal.cs
- PolicyException.cs
- RadialGradientBrush.cs
- WebPartDisplayModeCollection.cs
- EditableLabelControl.cs
- PEFileReader.cs
- NativeCppClassAttribute.cs
- XmlSchemaDocumentation.cs
- SoapReflectionImporter.cs
- IsolatedStorageException.cs
- ConnectionInterfaceCollection.cs
- WebPartVerbCollection.cs
- Int64Converter.cs
- ItemCheckEvent.cs
- XamlFigureLengthSerializer.cs