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
- ToolStripItemGlyph.cs
- FtpWebRequest.cs
- GeometryModel3D.cs
- DesignerSelectionListAdapter.cs
- CodeArrayCreateExpression.cs
- CustomPopupPlacement.cs
- Path.cs
- CheckBoxBaseAdapter.cs
- AccessControlEntry.cs
- GlyphRunDrawing.cs
- UniqueTransportManagerRegistration.cs
- RegistryDataKey.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- EnumMemberAttribute.cs
- odbcmetadatafactory.cs
- ServerType.cs
- NativeActivityAbortContext.cs
- EventDrivenDesigner.cs
- DbCommandDefinition.cs
- ConfigurationStrings.cs
- BamlTreeMap.cs
- EventProperty.cs
- RelationshipEnd.cs
- NonSerializedAttribute.cs
- AdapterUtil.cs
- SpnEndpointIdentityExtension.cs
- PropertyGridCommands.cs
- PackagePartCollection.cs
- UdpReplyToBehavior.cs
- HtmlHead.cs
- RowsCopiedEventArgs.cs
- CrossAppDomainChannel.cs
- SchemaComplexType.cs
- SoapSchemaMember.cs
- IssuanceLicense.cs
- ImportCatalogPart.cs
- TextElementCollection.cs
- BufferModeSettings.cs
- ConfigurationStrings.cs
- XmlSerializerNamespaces.cs
- InstanceCreationEditor.cs
- ResourceSet.cs
- BuilderPropertyEntry.cs
- MdiWindowListStrip.cs
- RegexGroup.cs
- SelectionEditingBehavior.cs
- ConfigurationSectionCollection.cs
- XmlResolver.cs
- SafeViewOfFileHandle.cs
- safesecurityhelperavalon.cs
- EntityCommandDefinition.cs
- AddInContractAttribute.cs
- BinaryObjectReader.cs
- TreeBuilder.cs
- SecurityState.cs
- Wildcard.cs
- SafeTimerHandle.cs
- DNS.cs
- Triplet.cs
- ParentQuery.cs
- ToggleButtonAutomationPeer.cs
- ProfileEventArgs.cs
- SrgsNameValueTag.cs
- _NegoState.cs
- CodeLabeledStatement.cs
- ConstraintCollection.cs
- RadioButtonFlatAdapter.cs
- _ScatterGatherBuffers.cs
- HandledEventArgs.cs
- SQLBoolean.cs
- FontSizeConverter.cs
- SHA1Managed.cs
- FlowPanelDesigner.cs
- AstTree.cs
- QueryConverter.cs
- SpecialTypeDataContract.cs
- TakeOrSkipWhileQueryOperator.cs
- DesignTimeSiteMapProvider.cs
- PackageRelationshipSelector.cs
- PrimitiveCodeDomSerializer.cs
- QilValidationVisitor.cs
- RegexWorker.cs
- Logging.cs
- ReliableOutputConnection.cs
- StorageMappingItemCollection.cs
- ReadWriteObjectLock.cs
- DocumentSequence.cs
- CatchBlock.cs
- WebResponse.cs
- Quaternion.cs
- XmlFormatExtensionPointAttribute.cs
- InheritanceAttribute.cs
- CompilationUtil.cs
- DbProviderFactoriesConfigurationHandler.cs
- ListDictionary.cs
- SiteMap.cs
- OleAutBinder.cs
- Base64Decoder.cs
- DiffuseMaterial.cs
- ServiceModelExtensionCollectionElement.cs