Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Attributes.cs
- TransportContext.cs
- WebScriptServiceHost.cs
- DashStyle.cs
- WebServiceParameterData.cs
- ToolStripMenuItemDesigner.cs
- Assert.cs
- CompilerScopeManager.cs
- SAPIEngineTypes.cs
- UnsafeNativeMethods.cs
- VirtualPath.cs
- DocobjHost.cs
- NotImplementedException.cs
- PropertyTabAttribute.cs
- SynchronizedDispatch.cs
- TimeManager.cs
- ConfigurationSectionGroupCollection.cs
- Point3DKeyFrameCollection.cs
- xamlnodes.cs
- COM2ComponentEditor.cs
- MissingSatelliteAssemblyException.cs
- MethodBuilder.cs
- SoapReflectionImporter.cs
- CannotUnloadAppDomainException.cs
- Win32Exception.cs
- InputLanguageSource.cs
- DocumentPage.cs
- loginstatus.cs
- WebHttpElement.cs
- GenericEnumConverter.cs
- ListViewContainer.cs
- SubstitutionList.cs
- ClrProviderManifest.cs
- CurrentChangingEventArgs.cs
- DataSourceListEditor.cs
- PopupEventArgs.cs
- TextProperties.cs
- StringSorter.cs
- WindowsFormsHostPropertyMap.cs
- adornercollection.cs
- Error.cs
- CodeGenerator.cs
- InputBuffer.cs
- ComContractElement.cs
- DurableServiceAttribute.cs
- ComponentResourceManager.cs
- FlowDocumentView.cs
- HtmlTextArea.cs
- ProcessHostConfigUtils.cs
- RegexGroup.cs
- MediaTimeline.cs
- BrowserDefinition.cs
- PersonalizationStateQuery.cs
- RoleGroup.cs
- FloaterParagraph.cs
- VirtualDirectoryMapping.cs
- XmlAttributeOverrides.cs
- BufferedGraphicsManager.cs
- EventListenerClientSide.cs
- MimeMapping.cs
- CurrentChangingEventManager.cs
- _WinHttpWebProxyDataBuilder.cs
- SQLDateTimeStorage.cs
- PowerStatus.cs
- UnitySerializationHolder.cs
- URIFormatException.cs
- ComboBoxItem.cs
- CodeExpressionCollection.cs
- TextServicesCompartment.cs
- Blend.cs
- GetFileNameResult.cs
- TransformGroup.cs
- VBIdentifierName.cs
- SqlInternalConnectionTds.cs
- ClientConfigurationHost.cs
- SessionPageStateSection.cs
- COMException.cs
- SocketElement.cs
- NetPipeSectionData.cs
- UriTemplateQueryValue.cs
- PolyBezierSegment.cs
- SetIndexBinder.cs
- VectorCollection.cs
- GradientStop.cs
- SolidColorBrush.cs
- TreeNodeStyleCollection.cs
- UrlMappingCollection.cs
- XmlObjectSerializerWriteContextComplex.cs
- HuffmanTree.cs
- SmtpNtlmAuthenticationModule.cs
- RequestDescription.cs
- SchemaCollectionCompiler.cs
- ScriptReferenceEventArgs.cs
- ExecutionContext.cs
- CompoundFileStreamReference.cs
- DiscoveryDocumentSerializer.cs
- GridViewSortEventArgs.cs
- QilValidationVisitor.cs
- IisTraceListener.cs
- SqlDataReaderSmi.cs