public void Run() { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final Runnable delegate = mDelegate.get(); IRunnable @delegate = (IRunnable)mDelegate.Get(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final ChainedRef reference = mReference.get(); ChainedRef reference = (ChainedRef)mReference.Get(); if (reference != null) { reference.remove(); } if (@delegate != null) { @delegate.Run(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Nullable public WeakRunnable remove(Runnable obj) public virtual WeakRunnable remove(IRunnable obj) { @lock.Lock(); try { ChainedRef curr = this.next; // Skipping head while (curr != null) { if (curr.runnable == obj) { // We do comparison exactly how Handler does inside return(curr.remove()); } curr = curr.next; } } finally { @lock.Unlock(); } return(null); }