예제 #1
0
        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);
        }
예제 #2
0
 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);
         }
     }
 }
예제 #3
0
 public COMGC()
 {
     _timer = Xpcom.CreateInstance <nsITimer>("@mozilla.org/timer;1");
     _timer.InitWithCallback(this, 5000, nsITimerConsts.TYPE_REPEATING_SLACK);
 }
예제 #4
0
파일: nsITimer.cs 프로젝트: REALTOBIZ/mono
		public static nsITimer GetProxy (Mono.WebBrowser.IWebBrowser control, nsITimer obj)
		{
			object o = Base.GetProxyForObject (control, typeof(nsITimer).GUID, obj);
			return o as nsITimer;
		}
예제 #5
0
        public static nsITimer GetProxy(Mono.WebBrowser.IWebBrowser control, nsITimer obj)
        {
            object o = Base.GetProxyForObject(control, typeof(nsITimer).GUID, obj);

            return(o as nsITimer);
        }