Exemplo n.º 1
0
 private TypeWithState(TypeSymbol type, NullableFlowState state)
 {
     Debug.Assert(state == NullableFlowState.NotNull || type?.CanContainNull() != false);
     Type  = type;
     State = state;
 }
Exemplo n.º 2
0
 public void Deconstruct(out TypeSymbol type, out NullableFlowState state) => (type, state) = (Type, State);
 public TokenInformation(ImmutableArray <ISymbol> symbols, bool showAwaitReturn = false, NullableFlowState nullableFlowState = NullableFlowState.None)
 {
     Symbols           = symbols;
     ShowAwaitReturn   = showAwaitReturn;
     NullableFlowState = nullableFlowState;
 }
Exemplo n.º 4
0
        public static TypeWithState Create(TypeSymbol type, NullableFlowState defaultState)
        {
            var state = defaultState == NullableFlowState.MaybeNull && type?.CanContainNull() != false ? NullableFlowState.MaybeNull : NullableFlowState.NotNull;

            return(new TypeWithState(type, state));
        }
Exemplo n.º 5
0
 internal NullabilityInfo(NullableAnnotation annotation, NullableFlowState flowState)
 {
     Annotation = annotation;
     FlowState  = flowState;
 }
Exemplo n.º 6
0
 public static NullableFlowState Meet(this NullableFlowState a, NullableFlowState b) => (a < b) ? a : b;
Exemplo n.º 7
0
 public static bool MayBeNull(this NullableFlowState state) => state != NullableFlowState.NotNull;
Exemplo n.º 8
0
 public string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null)
 => throw new NotImplementedException();
 public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
 {
     return(WrappedSymbol.ToMinimalDisplayString(semanticModel, topLevelNullability, position, format));
 }
Exemplo n.º 10
0
 public TypeWithState(TypeSymbol type, NullableFlowState state) => (Type, State) = (type, state);
 public ImmutableArray <SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
 {
     return(WrappedSymbol.ToMinimalDisplayParts(semanticModel, topLevelNullability, position, format));
 }
 public string ToDisplayString(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null)
 {
     return(WrappedSymbol.ToDisplayString(topLevelNullability, format));
 }
 public ImmutableArray <SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null)
 {
     return(WrappedSymbol.ToDisplayParts(topLevelNullability, format));
 }
 public string ToMinimalDisplayString(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 15
0
 public static bool IsNotNull(this NullableFlowState state) => state == NullableFlowState.NotNull;
 public ImmutableArray <SymbolDisplayPart> ToMinimalDisplayParts(SemanticModel semanticModel, NullableFlowState topLevelNullability, int position, SymbolDisplayFormat format = null)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 17
0
 public static NullableFlowState Join(this NullableFlowState a, NullableFlowState b) => (a > b) ? a : b;
Exemplo n.º 18
0
 public ImmutableArray <SymbolDisplayPart> ToDisplayParts(NullableFlowState topLevelNullability, SymbolDisplayFormat format = null)
 => throw new NotImplementedException();
Exemplo n.º 19
0
 public static bool MayBeNull(this NullableFlowState state) => state == NullableFlowState.MaybeNull;