23 references to EscapeLevel
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder.ValueChecks.cs (23)
109/// wider escape level. An destination that is <see cref="EscapeLevel.CallingMethod"/>
110/// can never be written to by an argument that has a level of <see cref="EscapeLevel.ReturnOnly"/>.
112internal EscapeLevel EscapeLevel { get; }
123internal MixableDestination(BoundExpression argument, EscapeLevel escapeLevel)
130internal bool IsAssignableFrom(EscapeLevel level) => EscapeLevel switch
132EscapeLevel.CallingMethod => level == EscapeLevel.CallingMethod,
133EscapeLevel.ReturnOnly => true,
195internal EscapeLevel EscapeLevel { get; }
199internal EscapeValue(ParameterSymbol? parameter, BoundExpression argument, EscapeLevel escapeLevel, bool isRefEscape)
207public void Deconstruct(out ParameterSymbol? parameter, out BoundExpression argument, out EscapeLevel escapeLevel, out bool isRefEscape)
1244private static EscapeLevel? EscapeLevelFromScope(uint scope) => scope switch
1246ReturnOnlyScope => EscapeLevel.ReturnOnly,
1247CallingMethodScope => EscapeLevel.CallingMethod,
1261private static EscapeLevel? GetParameterValEscapeLevel(ParameterSymbol parameter) =>
1276private static EscapeLevel? GetParameterRefEscapeLevel(ParameterSymbol parameter) =>
2465mixableArguments.Add(new MixableDestination(argument, EscapeLevel.CallingMethod));
2640escapeValues.Add(new EscapeValue(parameter: null, argument, EscapeLevel.ReturnOnly, isRefEscape: true));
2645escapeValues.Add(new EscapeValue(parameter: null, argument, EscapeLevel.CallingMethod, isRefEscape: false));
2716escapeValues.Add(new EscapeValue(parameter: null, argument, EscapeLevel.CallingMethod, isRefEscape: false));
2724escapeValues.Add(new EscapeValue(parameter, argument, EscapeLevel.CallingMethod, isRefEscape: false));
2729escapeValues.Add(new EscapeValue(parameter, argument, EscapeLevel.CallingMethod, isRefEscape: true));
4679if (escapeValue.IsRefEscape && escapeValue.EscapeLevel != EscapeLevel.CallingMethod)