PyriteCore.ScenarioCreation.IfAction.RemoveChecker C# (CSharp) Method

RemoveChecker() public method

public RemoveChecker ( Type checkerType ) : bool
checkerType System.Type
return bool
        public bool RemoveChecker(Type checkerType)
        {
            var result = false;
            if (Checker.GetType().Equals(checkerType))
                Checker = null;
            else if (Checker != null && Checker is IHasCheckerAction)
                if (((IHasCheckerAction)Checker).RemoveChecker(checkerType))
                    result = true;

            if (ActionIf != null && ActionIf is IHasCheckerAction)
                if (((IHasCheckerAction)ActionIf).RemoveChecker(checkerType))
                    result = true;

            if (ActionElse != null && ActionElse is IHasCheckerAction)
                if (((IHasCheckerAction)ActionElse).RemoveChecker(checkerType))
                    result = true;

            return result;
        }