public void Dispose() { if (_timer != null) { _timer.Cancel(); var localObj = Interlocked.Exchange(ref _timer, null); if (localObj != null) { Marshal.ReleaseComObject(localObj); } _timer = null; } GC.SuppressFinalize(this); }
public void Notify(nsITimer timer) { if (Monitor.TryEnter(_syncRoot)) { try { for (int i = _queue.Count; i > 0; i--) { _queue.Dequeue().Free(); } } finally { Monitor.Exit(_syncRoot); } } }
public COMGC() { _timer = Xpcom.CreateInstance <nsITimer>("@mozilla.org/timer;1"); _timer.InitWithCallback(this, 5000, nsITimerConsts.TYPE_REPEATING_SLACK); }
public static nsITimer GetProxy (Mono.WebBrowser.IWebBrowser control, nsITimer obj) { object o = Base.GetProxyForObject (control, typeof(nsITimer).GUID, obj); return o as nsITimer; }
public static nsITimer GetProxy(Mono.WebBrowser.IWebBrowser control, nsITimer obj) { object o = Base.GetProxyForObject(control, typeof(nsITimer).GUID, obj); return(o as nsITimer); }