public override ParameterValidationAbstractValue VisitIsNull(IIsNullOperation operation, object argument)
            {
                var value = base.VisitIsNull(operation, argument);

                // Mark a location as validated on paths where user has performed an IsNull check.
                // See comments in VisitBinaryOperatorCore override above for further details.
                MarkValidatedLocations(operation.Operand);

                return(value);
            }
            public override DisposeAbstractValue VisitIsNull(IIsNullOperation operation, object argument)
            {
                var value = base.VisitIsNull(operation, argument);

                // Handle null-check for a disposable symbol on a control flow branch.
                // See comments in VisitBinaryOperatorCore override above for further details.
                if (FlowBranchConditionKind == ControlFlowConditionKind.WhenTrue)
                {
                    HandlePossibleInvalidatingOperation(operation.Operand);
                }

                return(value);
            }
Ejemplo n.º 3
0
            public override ParameterValidationAbstractValue VisitIsNull(IIsNullOperation operation, object argument)
            {
                var value = base.VisitIsNull(operation, argument);

                // Mark a location as validated on paths where we know it is non-null.
                // See comments in VisitBinaryOperatorCore override above for further details.
                if (FlowBranchConditionKind == ControlFlowConditionKind.WhenFalse)
                {
                    MarkValidatedLocations(operation.Operand);
                }

                return(value);
            }
Ejemplo n.º 4
0
 public override IOperation VisitIsNull(IIsNullOperation operation, object argument)
 {
     throw ExceptionUtilities.Unreachable;
 }
Ejemplo n.º 5
0
 public virtual void VisitIsNull(IIsNullOperation operation)
 {
     DefaultVisit(operation);
 }
Ejemplo n.º 6
0
 public override void VisitIsNull(IIsNullOperation operation)
 {
     Assert.Equal(OperationKind.IsNull, operation.Kind);
     Assert.True(operation.IsImplicit);
     Assert.Same(operation.Operand, operation.Children.Single());
 }