Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / TeredoHelper.cs / 1305376 / TeredoHelper.cs
using System.Collections.Generic; using System.ComponentModel; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Security; using System.Threading; namespace System.Net.NetworkInformation { // This class wraps the native API NotifyStableUnicastIpAddressTable. The native function's behavior is: // // 1. If the address table is already stable, it returns ERROR_SUCCESS and a Mib table handle that we must free. // The passed-in callback will never be called, and the cancelHandle is set to NULL. // // 2. If the address table is not stable, it returns ERROR_IO_PENDING. The table handle is set to NULL, // and the cancelHandle is set to a valid handle. The callback will be called (on a native threadpool thread) // EVERY TIME the address table becomes stable until CancelMibChangeNotify2 is called on the cancelHandle // (via cancelHandle.Dispose()). // // CancelMibChangeNotify2 guarantees that, by the time it returns, all calls to the callback will be complete // and that no new calls to the callback will be issued. // // The major concerns of the class are: 1) making sure none of the managed objects needed to handle a native // callback are GC'd before the callback, and 2) making sure no native callbacks will try to call into an unloaded // AppDomain. [SuppressUnmanagedCodeSecurity] internal class TeredoHelper { // Holds a list of all pending calls to NotifyStableUnicastIpAddressTable. Also used as a lock to protect its // contents and impendingAppDomainUnload. private static ListpendingNotifications; // Flag that gets set when an AppDomain unload is imminent. When this is set, no more calls to // NotifyStableUnicastIpAddressTable are allowed. private static bool impendingAppDomainUnload; private readonly Action
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Transform3D.cs
- ToolboxItemFilterAttribute.cs
- Window.cs
- tooltip.cs
- ThumbAutomationPeer.cs
- PageClientProxyGenerator.cs
- GuidelineCollection.cs
- XamlReader.cs
- MappedMetaModel.cs
- IndexedWhereQueryOperator.cs
- RangeContentEnumerator.cs
- PointAnimationUsingKeyFrames.cs
- Base64Stream.cs
- SpellCheck.cs
- _AutoWebProxyScriptWrapper.cs
- TreeIterators.cs
- FontFamily.cs
- TemplateBindingExtensionConverter.cs
- ClientEventManager.cs
- ProjectionCamera.cs
- BackgroundWorker.cs
- CompositeControlDesigner.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- DragEvent.cs
- PageContent.cs
- FixedSOMLineRanges.cs
- QueryContinueDragEventArgs.cs
- AssociatedControlConverter.cs
- RegexWriter.cs
- Stacktrace.cs
- TemplateBindingExtensionConverter.cs
- MemberPathMap.cs
- IssuedTokenParametersElement.cs
- XmlAttribute.cs
- KeyGesture.cs
- UInt64.cs
- FactoryGenerator.cs
- ParameterElementCollection.cs
- BinaryWriter.cs
- ZipIOExtraField.cs
- JsonStringDataContract.cs
- DoubleAnimationClockResource.cs
- JoinSymbol.cs
- Logging.cs
- GeometryModel3D.cs
- DocComment.cs
- ResourceManagerWrapper.cs
- CancelEventArgs.cs
- ImageIndexEditor.cs
- XmlDataSourceDesigner.cs
- Int64AnimationBase.cs
- StrokeIntersection.cs
- ExpanderAutomationPeer.cs
- StickyNoteAnnotations.cs
- ServiceChannelManager.cs
- SwitchAttribute.cs
- Error.cs
- InitializationEventAttribute.cs
- PersonalizationDictionary.cs
- CryptographicAttribute.cs
- XmlSchemaAnnotation.cs
- FixedDocumentPaginator.cs
- StringCollection.cs
- GatewayDefinition.cs
- CodeSnippetCompileUnit.cs
- ObjectListShowCommandsEventArgs.cs
- CookieParameter.cs
- HtmlControl.cs
- TransactionFlowElement.cs
- MetafileHeaderWmf.cs
- SoapReflectionImporter.cs
- NotFiniteNumberException.cs
- BitStream.cs
- NotConverter.cs
- HandledEventArgs.cs
- ConnectionStringsExpressionEditor.cs
- ItemType.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SqlStatistics.cs
- __ComObject.cs
- LinqDataSourceContextEventArgs.cs
- UMPAttributes.cs
- SendActivityDesignerTheme.cs
- ProvideValueServiceProvider.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- X509CertificateRecipientServiceCredential.cs
- OutputCacheProfile.cs
- DataListCommandEventArgs.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ServicesUtilities.cs
- RadioButton.cs
- LostFocusEventManager.cs
- ProviderBase.cs
- StreamGeometryContext.cs
- ManagedFilter.cs
- ToolStripLabel.cs
- SystemFonts.cs
- SafeHandles.cs
- PropertyInfoSet.cs
- EncryptedReference.cs