40 references to ThisParameter
Microsoft.CodeAnalysis.CSharp (40)
Binder\Binder.ValueChecks.cs (4)
3777
var thisParam = ((MethodSymbol)_symbol).
ThisParameter
;
4072
var thisParam = ((MethodSymbol)_symbol).
ThisParameter
;
4384
var thisParam = ((MethodSymbol)_symbol).
ThisParameter
;
5081
var thisParam = ((MethodSymbol)_symbol).
ThisParameter
;
Binder\Binder_Expressions.cs (1)
2159
else if (primaryCtor is {
ThisParameter
.RefKind: not RefKind.None } &&
Compiler\MethodBodySynthesizer.cs (3)
185
var thisSymbol = accessor.
ThisParameter
;
282
field.IsStatic || field.ContainingSymbol is NamedTypeSymbol { IsExtension: true } ? null : new BoundThisReference(syntax, accessor.
ThisParameter
.Type),
352
ParameterSymbol thisParameter = accessor.
ThisParameter
;
Compiler\MethodCompiler.cs (1)
1574
method.
ThisParameter
,
FlowAnalysis\NullableWalker.cs (1)
2184
var thisParameter = method?.
ThisParameter
;
FlowAnalysis\ReadWriteWalker.cs (1)
99
var thisParameter = m.
ThisParameter
;
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (2)
55
var thisParameter = rewriter._factory.CurrentFunction.
ThisParameter
;
306
var thisParameter = this._factory.CurrentFunction.
ThisParameter
;
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (2)
495
AddIfCaptured(_topLevelMethod.
ThisParameter
, node.Syntax);
501
var thisParam = _topLevelMethod.
ThisParameter
;
Lowering\ClosureConversion\ClosureConversion.cs (4)
805
symbol == _currentMethod.
ThisParameter
&&
825
symbol != _currentMethod.
ThisParameter
||
857
return (_currentMethod == _topLevelMethod || _topLevelMethod.
ThisParameter
== null ?
1591
_currentFrameThis = synthesizedMethod.
ThisParameter
;
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (6)
75
walker.CaptureVariable(method.
ThisParameter
, node.Syntax);
318
var thisSymbol = topLevelMethod.
ThisParameter
;
327
CaptureVariable(topLevelMethod.
ThisParameter
, node.Syntax);
333
CaptureVariable(topLevelMethod.
ThisParameter
, node.Syntax);
421
Capture(_topLevelMethod.
ThisParameter
, node.Syntax);
427
Capture(_topLevelMethod.
ThisParameter
, node.Syntax);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
144
var thisParameter = originalMethod.
ThisParameter
;
799
CapturedSymbolReplacement proxy = proxies[this.OriginalMethod.
ThisParameter
];
816
var thisParameter = this.OriginalMethod.
ThisParameter
;
850
CapturedSymbolReplacement proxy = proxies[this.OriginalMethod.
ThisParameter
];
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
317
Debug.Assert((object)method.
ThisParameter
!= null);
320
if (proxies.TryGetValue(method.
ThisParameter
, out proxy))
448
if (method.IsStatic || method.
ThisParameter
.Type.IsReferenceType)
474
if (copyDest.TryGetValue(method.
ThisParameter
, out proxy))
481
var rightExpression = copySrc[method.
ThisParameter
].Replacement(F.Syntax, static (stateMachineType, F) => F.This(), F);
Lowering\SyntheticBoundNodeFactory.cs (4)
229
Debug.Assert(CurrentFunction is { IsStatic: false,
ThisParameter
: { } });
230
return new BoundThisReference(Syntax, CurrentFunction.
ThisParameter
.Type) { WasCompilerGenerated = true };
1225
Debug.Assert(CurrentFunction is {
ThisParameter
: { } });
1226
NamedTypeSymbol baseType = CurrentFunction.
ThisParameter
.Type.BaseTypeNoUseSiteDiagnostics;
Symbols\SymbolExtensions.cs (2)
177
return method.
ThisParameter
;
196
return type.IsScriptClass ? type.InstanceConstructors.Single().
ThisParameter
: null;