public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
        {
            LogString(nameof(IConditionalAccessExpression));
            LogCommonPropertiesAndNewLine(operation);

            Visit(operation.ConditionalInstance, header: "Left");
            Visit(operation.ConditionalValue, header: "Right");
        }
Esempio n. 2
0
        private static bool IsAccessedFromOpenType(
            [CanBeNull] IConditionalAccessExpression conditionalAccessExpression)
        {
            if (conditionalAccessExpression is IInvocationExpression)
            {
                conditionalAccessExpression =
                    conditionalAccessExpression.ConditionalQualifier as IConditionalAccessExpression;
            }

            if (conditionalAccessExpression == null)
            {
                return(false);
            }

            return(conditionalAccessExpression.ConditionalQualifier?.Type().IsOpenType ?? false);
        }
Esempio n. 3
0
 public virtual void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     DefaultVisit(operation);
 }
Esempio n. 4
0
 public virtual void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     DefaultVisit(operation);
 }
Esempio n. 5
0
 public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     Visit(operation.ConditionalInstance);
     Visit(operation.ConditionalValue);
 }
Esempio n. 6
0
 public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     base.VisitConditionalAccessExpression(operation);
 }
 /// <inheritdoc />
 public override IOperation VisitConditionalAccessExpression(IConditionalAccessExpression operation, object argument)
 {
     return(base.VisitConditionalAccessExpression(operation, argument));
 }
 public static IConditionalAccessExpression Update(this IConditionalAccessExpression self, IOperation @receiver, IOperation @accessExpression, ITypeSymbol @type) => self;
 /// <inheritdoc />
 public override Expression VisitConditionalAccessExpression(IConditionalAccessExpression operation, LocalBinder argument)
 {
     return(base.VisitConditionalAccessExpression(operation, argument));
 }
Esempio n. 10
0
 public override IOperation VisitConditionalAccessExpression(IConditionalAccessExpression operation, object argument)
 {
     return(new ConditionalAccessExpression(Visit(operation.WhenNotNull), Visit(operation.Expression), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue, operation.IsImplicit));
 }
Esempio n. 11
0
 public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     base.VisitConditionalAccessExpression(operation);
 }
Esempio n. 12
0
 public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
 {
     Visit(operation.Access);
 }
 public UnityNullPropagationWarning(IConditionalAccessExpression expression)
 {
     Expression = expression;
 }