Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- SortQuery.cs
- GB18030Encoding.cs
- DataProtection.cs
- SingleTagSectionHandler.cs
- EmissiveMaterial.cs
- ZoneLinkButton.cs
- EnvelopedPkcs7.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- WindowsIPAddress.cs
- InstanceDataCollection.cs
- XsltConvert.cs
- Selection.cs
- DetailsViewModeEventArgs.cs
- WsiProfilesElement.cs
- Span.cs
- FilterQueryOptionExpression.cs
- WindowsGraphicsWrapper.cs
- MediaContext.cs
- StrongNameHelpers.cs
- BatchParser.cs
- SafeWaitHandle.cs
- IIS7UserPrincipal.cs
- securestring.cs
- SchemaImporterExtensionElementCollection.cs
- AdRotator.cs
- Point3DConverter.cs
- SvcMapFile.cs
- AppDomain.cs
- PublisherMembershipCondition.cs
- IsolatedStorageFile.cs
- MatrixIndependentAnimationStorage.cs
- SemaphoreSecurity.cs
- NavigationEventArgs.cs
- BufferedStream.cs
- MaskDescriptor.cs
- XLinq.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- SQLBinary.cs
- DataSourceHelper.cs
- Axis.cs
- SmiRecordBuffer.cs
- MessageQueuePermissionAttribute.cs
- BinaryEditor.cs
- SetterBaseCollection.cs
- OAVariantLib.cs
- PartialTrustHelpers.cs
- SHA256Managed.cs
- TextParagraphProperties.cs
- FactoryMaker.cs
- ReceiveCompletedEventArgs.cs
- OrderedDictionary.cs
- DbConnectionHelper.cs
- TypedReference.cs
- InternalCache.cs
- ListViewGroup.cs
- BamlLocalizableResourceKey.cs
- DiscoveryClientBindingElement.cs
- _UriSyntax.cs
- FramingDecoders.cs
- ObjectTag.cs
- BoundField.cs
- MsmqChannelListenerBase.cs
- UserNamePasswordValidationMode.cs
- DetailsViewInsertEventArgs.cs
- SHA384Managed.cs
- CommunicationObjectFaultedException.cs
- SqlPersonalizationProvider.cs
- ColumnPropertiesGroup.cs
- RemoteWebConfigurationHostStream.cs
- XmlStreamStore.cs
- DataGridViewTextBoxEditingControl.cs
- GetWinFXPath.cs
- TypefaceMetricsCache.cs
- OrthographicCamera.cs
- IsolatedStorageFilePermission.cs
- EncodingInfo.cs
- ButtonColumn.cs
- ParallelTimeline.cs
- DesignerActionUI.cs
- FrameDimension.cs
- PerformanceCounterLib.cs
- XmlElementAttributes.cs
- Lease.cs
- CodeObject.cs
- Geometry.cs
- Merger.cs
- BindableTemplateBuilder.cs
- XPathExpr.cs
- SystemGatewayIPAddressInformation.cs
- EventData.cs
- MoveSizeWinEventHandler.cs
- ScriptReferenceEventArgs.cs
- UInt32.cs
- BamlRecordReader.cs
- PreProcessInputEventArgs.cs
- PrintPageEvent.cs
- DbMetaDataCollectionNames.cs
- SqlError.cs
- ADMembershipUser.cs
- InheritedPropertyChangedEventArgs.cs