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
- Transform3DGroup.cs
- StackSpiller.Bindings.cs
- WindowsGrip.cs
- ParsedAttributeCollection.cs
- SqlExpressionNullability.cs
- DataGridViewCellStyleChangedEventArgs.cs
- GridViewDesigner.cs
- OdbcConnection.cs
- DirectionalLight.cs
- BooleanSwitch.cs
- XmlCharCheckingWriter.cs
- AutoSizeComboBox.cs
- DrawingContextDrawingContextWalker.cs
- SerializationFieldInfo.cs
- ToolBarTray.cs
- Debug.cs
- DataGridViewTextBoxEditingControl.cs
- SerialReceived.cs
- Schedule.cs
- WmlLabelAdapter.cs
- VectorCollectionValueSerializer.cs
- safesecurityhelperavalon.cs
- DataTableReader.cs
- TreeNodeCollection.cs
- BuildManager.cs
- ToolStripContentPanelRenderEventArgs.cs
- FuncTypeConverter.cs
- newitemfactory.cs
- UrlPath.cs
- ObjectStateEntryDbDataRecord.cs
- Keywords.cs
- FileDialogCustomPlacesCollection.cs
- AutomationPatternInfo.cs
- DrawListViewSubItemEventArgs.cs
- SqlDataSourceSummaryPanel.cs
- ElementHostAutomationPeer.cs
- DifferencingCollection.cs
- ListArgumentProvider.cs
- ToolStripDesignerAvailabilityAttribute.cs
- FixedSOMTable.cs
- XPathNodeInfoAtom.cs
- SapiInterop.cs
- ContentTextAutomationPeer.cs
- SafeFindHandle.cs
- CultureSpecificStringDictionary.cs
- ContentElement.cs
- CompressionTransform.cs
- MLangCodePageEncoding.cs
- Triplet.cs
- UniqueID.cs
- CannotUnloadAppDomainException.cs
- XmlSchemaComplexContent.cs
- XmlILTrace.cs
- KeyPressEvent.cs
- HtmlPhoneCallAdapter.cs
- TypedColumnHandler.cs
- PropertyMappingExceptionEventArgs.cs
- ConfigurationLocationCollection.cs
- ToolStripSettings.cs
- Inflater.cs
- ExpressionVisitor.cs
- EnvironmentPermission.cs
- OletxResourceManager.cs
- Vector3DCollectionValueSerializer.cs
- BindingsCollection.cs
- IPHostEntry.cs
- TextUtf8RawTextWriter.cs
- CombinedGeometry.cs
- XmlCharCheckingWriter.cs
- BoolExpr.cs
- ProxyWebPartManager.cs
- MatrixIndependentAnimationStorage.cs
- UrlPath.cs
- ItemDragEvent.cs
- activationcontext.cs
- ObjectTag.cs
- XmlElementList.cs
- MatchNoneMessageFilter.cs
- WebEvents.cs
- TargetInvocationException.cs
- OpenTypeMethods.cs
- OrderByBuilder.cs
- LogWriteRestartAreaAsyncResult.cs
- ProfileGroupSettings.cs
- ParserStack.cs
- bindurihelper.cs
- HttpInputStream.cs
- ItemAutomationPeer.cs
- listitem.cs
- UIElementCollection.cs
- WorkerRequest.cs
- SchemaSetCompiler.cs
- WebUtil.cs
- SectionVisual.cs
- SQLInt16.cs
- Durable.cs
- UserControlParser.cs
- DbConnectionOptions.cs
- _UncName.cs
- DefaultMemberAttribute.cs