コード例 #1
0
 /// <summary> Deregisters a cursor from the list to be notified of changes.
 ///
 /// </summary>
 /// <param name="cursor"> the cursor to deregister
 /// </param>
 protected internal virtual void  unregisterCursor(Cursor cursor)
 {
     //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javautilIteratorhasNext_3"'
     for (System.Collections.IEnumerator it = cursors.GetEnumerator(); it.MoveNext();)
     {
         //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javautilIteratornext_3"'
         System.WeakReference ref_Renamed = (System.WeakReference)it.Current;
         //UPGRADE_ISSUE: Method 'java.lang.ref.Reference.get' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangrefReference_3"'
         Cursor cur = (Cursor)ref_Renamed.get_Renamed();
         if (cur == null)
         {
             // some other unrelated cursor object has been
             // garbage-collected; let's take the opportunity to
             // clean up the cursors list anyway..
             //UPGRADE_ISSUE: Method 'java.util.Iterator.remove' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javautilIteratorremove_3"'
             it.remove();
         }
         else if (cur == cursor)
         {
             //UPGRADE_ISSUE: Method 'java.lang.ref.Reference.clear' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangrefReference_3"'
             ref_Renamed.clear();
             //UPGRADE_ISSUE: Method 'java.util.Iterator.remove' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javautilIteratorremove_3"'
             it.remove();
             break;
         }
     }
 }