public override UnicastIPAddressInformationCollection GetUnicastAddresses() { // Wait for the Address Table to stabilize using (ManualResetEvent stable = new ManualResetEvent(false)) { if (!TeredoHelper.UnsafeNotifyStableUnicastIpAddressTable(StableUnicastAddressTableCallback, stable)) { stable.WaitOne(); } } return(GetUnicastAddressTable()); }
public override IAsyncResult BeginGetUnicastAddresses(AsyncCallback callback, object state) { ContextAwareResult asyncResult = new ContextAwareResult(false, false, this, state, callback); asyncResult.StartPostingAsyncOp(false); if (TeredoHelper.UnsafeNotifyStableUnicastIpAddressTable(StableUnicastAddressTableCallback, asyncResult)) { asyncResult.InvokeCallback(); } asyncResult.FinishPostingAsyncOp(); return(asyncResult); }
public override UnicastIPAddressInformationCollection GetUnicastAddresses() { if (!ComNetOS.IsVista) { throw new PlatformNotSupportedException(SR.GetString("VistaRequired")); } using (ManualResetEvent event2 = new ManualResetEvent(false)) { if (!TeredoHelper.UnsafeNotifyStableUnicastIpAddressTable(new Action <object>(SystemIPGlobalProperties.StableUnicastAddressTableCallback), event2)) { event2.WaitOne(); } } return(GetUnicastAddressTable()); }
public override IAsyncResult BeginGetUnicastAddresses(AsyncCallback callback, object state) { if (!ComNetOS.IsVista) { throw new PlatformNotSupportedException(SR.GetString("VistaRequired")); } ContextAwareResult result = new ContextAwareResult(false, false, this, state, callback); result.StartPostingAsyncOp(false); if (TeredoHelper.UnsafeNotifyStableUnicastIpAddressTable(new Action <object>(SystemIPGlobalProperties.StableUnicastAddressTableCallback), result)) { result.InvokeCallback(); } result.FinishPostingAsyncOp(); return(result); }