67 references to Create
Microsoft.CodeAnalysis.CSharp (66)
FlowAnalysis\NullableWalker.cs (59)
113
RValueType = TypeWithState.
Create
(type, state);
187
private static readonly TypeWithState _invalidType = TypeWithState.
Create
(ErrorTypeSymbol.UnknownResultType, NullableFlowState.NotNull);
2789
return TypeWithState.
Create
(parameterType.Type, NullableFlowState.MaybeDefault);
2794
return TypeWithState.
Create
(parameterType.Type, NullableFlowState.NotNull);
3448
SetResultType(node, TypeWithState.
Create
(null, NullableFlowState.NotNull));
3490
var result = TypeWithState.
Create
(type, resultState);
3992
TypeWithState.
Create
(containingType, receiverResult.RValueType.State), receiverResult.LValueType.WithType(containingType)),
4010
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
4116
SetResultType(node, TypeWithState.
Create
(anonymousType, NullableFlowState.NotNull));
4148
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
4153
SetResultType(node, TypeWithState.
Create
(arrayType, NullableFlowState.NotNull));
4231
inferredType = TypeWithState.
Create
(inferredType.Type, elementState).ToTypeWithAnnotations(compilation);
4451
return TypeWithState.
Create
(resultType, resultState);
5115
TypeWithState resultType = TypeWithState.
Create
(targetType.Type, rightResult.State);
5134
SetResultType(node, TypeWithState.
Create
(node.Type, rightUnconditionalResult.State));
5168
SetResultType(node, TypeWithState.
Create
(resultType, rightResult.State.Join(leftState)));
5201
TypeWithState.
Create
(leftType, NullableFlowState.NotNull),
5384
SetResultType(node, TypeWithState.
Create
(resultType, NullableFlowState.MaybeDefault));
5447
SetResult(node, TypeWithState.
Create
(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation));
5499
SetResultType(node, TypeWithState.
Create
(resultType, default));
5544
var typeWithState = TypeWithState.
Create
(resultTypeWithAnnotations.Type, resultState);
5557
return TypeWithState.
Create
(resultTypeWithAnnotations.Type, resultState);
5674
SetResultType(node, TypeWithState.
Create
(rvalueType, NullableFlowState.NotNull));
6041
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.NotNull);
6046
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.MaybeDefault);
6324
TrackAnalyzedNullabilityThroughConversionGroup(TypeWithState.
Create
(argument.Type, result.RValueType.State), argument as BoundConversion, argumentNoConversion);
6717
parameterWithState = TypeWithState.
Create
(parameterType.Type, adjustedState);
6840
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.MaybeDefault);
6846
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.NotNull);
6861
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.MaybeDefault);
6865
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.NotNull);
6880
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.MaybeDefault);
6884
return TypeWithState.
Create
(typeWithState.Type, NullableFlowState.NotNull);
7313
return TypeWithState.
Create
(type.Type, state);
7577
SetResultType(node, TypeWithState.
Create
(null, NullableFlowState.NotNull));
7596
SetResultType(node, TypeWithState.
Create
(tupleOpt, NullableFlowState.NotNull));
8015
return TypeWithState.
Create
(targetType, NullableFlowState.NotNull);
8249
var resultType = TypeWithState.
Create
(targetType, resultState);
8457
var resultType = TypeWithState.
Create
(targetType, NullableFlowState.NotNull);
8610
new VisitResult(TypeWithState.
Create
(newType, visitResult.RValueType.State),
8622
return TypeWithState.
Create
(type, state);
8734
var result = TypeWithState.
Create
(delegateType, NullableFlowState.NotNull);
9019
var rvalueResult = TypeWithState.
Create
(node.Type, NullableFlowState.NotNull);
9096
SetResult(node, TypeWithState.
Create
(leftLValueType.Type, rightState.State), leftLValueType);
9435
var valueBeforeNullableWrapping = TypeWithState.
Create
(underlyingType.Type, NullableFlowState.NotNull);
9695
resultType = TypeWithState.
Create
(node.Type, NullableFlowState.NotNull);
9716
SetResultType(node.Expression, TypeWithState.
Create
(node.Expression.Type, ResultType.State));
9903
resultType = TypeWithState.
Create
(resultType.Type, state);
10372
TypeWithState.
Create
(node.Type, node.OperatorKind.IsLifted() ? argumentResult.State : NullableFlowState.NotNull);
10419
return TypeWithState.
Create
(node.Type, NullableFlowState.NotNull);
10537
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
10559
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.MaybeDefault));
10643
SetResultType(node, TypeWithState.
Create
(type, resultState));
10675
SetResultType(node, TypeWithState.
Create
(node.Type, node.Type?.CanContainNull() != false && node.ConstantValueOpt?.IsNull == true ? NullableFlowState.MaybeDefault : NullableFlowState.NotNull));
10852
SetResultType(expression, TypeWithState.
Create
(expression.Type, default));
10959
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
10974
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
11023
SetResultType(node, TypeWithState.
Create
(node.Type, NullableFlowState.NotNull));
11029
SetResultType(node, TypeWithState.
Create
(type, NullableFlowState.NotNull));
FlowAnalysis\NullableWalker_Patterns.cs (4)
643
var value = TypeWithState.
Create
(tempType, tempState);
655
TrackNullableStateForAssignment(valueOpt: null, inferredType, localSlot, TypeWithState.
Create
(tempType, tempState), tempSlot);
925
resultType = TypeWithState.
Create
(inferredType, inferredState);
975
TypeWithState resultType = TypeWithState.
Create
(inferredTypeWithAnnotations.Type, inferredState);
Symbols\TypeWithAnnotations.cs (1)
782
return TypeWithState.
Create
(Type, getFlowState(Type, NullableAnnotation));
Symbols\TypeWithState.cs (2)
25
return
Create
(type, NullableFlowState.MaybeDefault);
66
return
Create
(type, state);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
476
var type = TypeWithState.
Create
(