Mono.Debugger.DebuggerSession.ActivateOrDeactivateEventAsync C# (CSharp) Method

ActivateOrDeactivateEventAsync() public method

public ActivateOrDeactivateEventAsync ( Event handle, bool activate ) : bool
handle Event
activate bool
return bool
        public bool ActivateOrDeactivateEventAsync(Event handle, bool activate)
        {
            lock (this) {
                if (!handle.NeedsActivation || (activate == handle.IsActivated))
                    return false;

                var action = activate ? BreakpointHandle.Action.Insert :
                    BreakpointHandle.Action.Remove;

                Breakpoint breakpoint = (Breakpoint) handle;
                if (pending_bpts.ContainsKey (breakpoint))
                    pending_bpts [breakpoint] = action;
                else
                    pending_bpts.Add (breakpoint, action);

                return true;
            }
        }