Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / AsyncOperationManager.cs / 1 / AsyncOperationManager.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.Collections; using System.Threading; using System.Diagnostics; using System.Security.Permissions; [HostProtection(SharedState = true)] public static class AsyncOperationManager { public static AsyncOperation CreateOperation(object userSuppliedState) { return AsyncOperation.CreateOperation(userSuppliedState, SynchronizationContext); } ///[EditorBrowsable(EditorBrowsableState.Advanced)] public static SynchronizationContext SynchronizationContext { get { if (SynchronizationContext.Current == null) { SynchronizationContext.SetSynchronizationContext(new SynchronizationContext()); } return SynchronizationContext.Current; } // a thread should set this to null when it is done, else the context will never be disposed/GC'd [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { SynchronizationContext.SetSynchronizationContext(value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System.Collections; using System.Threading; using System.Diagnostics; using System.Security.Permissions; [HostProtection(SharedState = true)] public static class AsyncOperationManager { public static AsyncOperation CreateOperation(object userSuppliedState) { return AsyncOperation.CreateOperation(userSuppliedState, SynchronizationContext); } ///[EditorBrowsable(EditorBrowsableState.Advanced)] public static SynchronizationContext SynchronizationContext { get { if (SynchronizationContext.Current == null) { SynchronizationContext.SetSynchronizationContext(new SynchronizationContext()); } return SynchronizationContext.Current; } // a thread should set this to null when it is done, else the context will never be disposed/GC'd [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { SynchronizationContext.SetSynchronizationContext(value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmtpFailedRecipientException.cs
- GiveFeedbackEvent.cs
- TemplatePropertyEntry.cs
- TokenizerHelper.cs
- ObjectDisposedException.cs
- ScriptManager.cs
- ObjectSecurity.cs
- XmlEntityReference.cs
- WebPageTraceListener.cs
- ElementHostAutomationPeer.cs
- QueryStringParameter.cs
- TrustManager.cs
- CalloutQueueItem.cs
- MimeImporter.cs
- PropertyOverridesTypeEditor.cs
- XomlCompilerResults.cs
- ValidatorAttribute.cs
- remotingproxy.cs
- XmlAttributeOverrides.cs
- DataGridCommandEventArgs.cs
- HebrewNumber.cs
- MachineKeySection.cs
- DataPagerFieldCommandEventArgs.cs
- Bold.cs
- WebPart.cs
- ControlBuilder.cs
- ParameterCollection.cs
- AutoResetEvent.cs
- SecurityPolicySection.cs
- WebPartEditorApplyVerb.cs
- UpdatePanelTriggerCollection.cs
- AnimationTimeline.cs
- RecordBuilder.cs
- baseaxisquery.cs
- storepermission.cs
- FixedLineResult.cs
- BuildManager.cs
- XmlSchemaRedefine.cs
- DataGridViewRowEventArgs.cs
- Int32KeyFrameCollection.cs
- WinInet.cs
- ServiceInfo.cs
- ItemAutomationPeer.cs
- SessionStateUtil.cs
- VisualStyleRenderer.cs
- DecoderReplacementFallback.cs
- GroupByExpressionRewriter.cs
- VectorCollectionConverter.cs
- MappingMetadataHelper.cs
- SelectionProcessor.cs
- ReliableInputConnection.cs
- DataGridDetailsPresenterAutomationPeer.cs
- XmlSchemaAppInfo.cs
- WriterOutput.cs
- ViewSimplifier.cs
- MTConfigUtil.cs
- login.cs
- TypeContext.cs
- DbCommandDefinition.cs
- GlyphElement.cs
- RegexGroupCollection.cs
- EditBehavior.cs
- WebPartConnectionsCancelVerb.cs
- FigureParagraph.cs
- XmlName.cs
- ItemsControl.cs
- HtmlInputRadioButton.cs
- SerialStream.cs
- UriTemplateLiteralQueryValue.cs
- LineBreakRecord.cs
- PropertyCollection.cs
- HttpWebRequest.cs
- ProxyWebPart.cs
- HtmlTable.cs
- ProfilePropertySettings.cs
- XamlPathDataSerializer.cs
- SQLInt64.cs
- StylusPlugInCollection.cs
- CodeMemberProperty.cs
- AssemblyHash.cs
- DropShadowBitmapEffect.cs
- XmlSchemaAnnotation.cs
- PeerObject.cs
- AssociationSetMetadata.cs
- XPathMultyIterator.cs
- FileLevelControlBuilderAttribute.cs
- BackgroundWorker.cs
- BooleanAnimationUsingKeyFrames.cs
- DataGridPageChangedEventArgs.cs
- ParsedRoute.cs
- CanExpandCollapseAllConverter.cs
- CompilerResults.cs
- Activator.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- ContextProperty.cs
- TransportReplyChannelAcceptor.cs
- Array.cs
- WebPartConnectionsCancelVerb.cs
- Timer.cs
- SafeNativeMethodsOther.cs