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
- ExpressionHelper.cs
- _BaseOverlappedAsyncResult.cs
- SafeSystemMetrics.cs
- XmlSchemaType.cs
- HMACSHA384.cs
- StartFileNameEditor.cs
- IsolatedStorageFilePermission.cs
- DataGridTextBoxColumn.cs
- TypeUsageBuilder.cs
- ServiceContractListItem.cs
- XmlNotation.cs
- RowsCopiedEventArgs.cs
- MinMaxParagraphWidth.cs
- Stack.cs
- handlecollector.cs
- HwndSource.cs
- ExtenderControl.cs
- XamlReaderHelper.cs
- FormViewUpdateEventArgs.cs
- ViewBox.cs
- DaylightTime.cs
- hresults.cs
- AnnotationResourceChangedEventArgs.cs
- QueryResult.cs
- RuntimeConfigurationRecord.cs
- AssemblyBuilder.cs
- ServerValidateEventArgs.cs
- InheritanceContextHelper.cs
- ConnectionOrientedTransportBindingElement.cs
- SessionStateItemCollection.cs
- ObjectListSelectEventArgs.cs
- GridPattern.cs
- BinarySerializer.cs
- TemplateField.cs
- ImageAutomationPeer.cs
- WindowsGrip.cs
- CalendarTable.cs
- NameValueConfigurationCollection.cs
- MouseGestureValueSerializer.cs
- HttpTransportSecurity.cs
- DragStartedEventArgs.cs
- ReadOnlyDataSourceView.cs
- JpegBitmapDecoder.cs
- PointUtil.cs
- CriticalFileToken.cs
- CodeGenHelper.cs
- InternalControlCollection.cs
- HuffModule.cs
- IgnorePropertiesAttribute.cs
- SqlNotificationEventArgs.cs
- SqlError.cs
- AppSettings.cs
- ConnectionOrientedTransportChannelFactory.cs
- EncoderExceptionFallback.cs
- AsyncStreamReader.cs
- ListViewTableRow.cs
- TypeSystemHelpers.cs
- CodeAttributeArgument.cs
- WhitespaceRuleReader.cs
- BufferBuilder.cs
- AuthorizationRuleCollection.cs
- Menu.cs
- OledbConnectionStringbuilder.cs
- ValueTable.cs
- TypeUsage.cs
- ScriptDescriptor.cs
- EventLogPermission.cs
- TreeNodeSelectionProcessor.cs
- CodeTypeReferenceCollection.cs
- CallId.cs
- ConditionalWeakTable.cs
- ReaderWriterLock.cs
- BamlResourceDeserializer.cs
- XNodeNavigator.cs
- Identifier.cs
- InfocardClientCredentials.cs
- ModifierKeysConverter.cs
- RoleManagerModule.cs
- DesignSurfaceCollection.cs
- SystemMulticastIPAddressInformation.cs
- AllMembershipCondition.cs
- TableLayoutCellPaintEventArgs.cs
- BypassElement.cs
- ReadOnlyNameValueCollection.cs
- GeneralTransform3DCollection.cs
- CodeCommentStatement.cs
- ProcessHostFactoryHelper.cs
- FontDialog.cs
- EventWaitHandle.cs
- GiveFeedbackEventArgs.cs
- ImageMap.cs
- CapabilitiesRule.cs
- MarkupCompiler.cs
- CustomActivityDesigner.cs
- BufferedGraphicsManager.cs
- TreeNodeStyleCollection.cs
- TypeSemantics.cs
- Int32KeyFrameCollection.cs
- HtmlInputHidden.cs
- XslAstAnalyzer.cs