58 references to ValueUsageInfo
Microsoft.CodeAnalysis.Workspaces (58)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (9)
659
return SymbolUsageInfo.Create(
ValueUsageInfo
.WritableReference);
663
return SymbolUsageInfo.Create(
ValueUsageInfo
.ReadableWritableReference);
667
return SymbolUsageInfo.Create(
ValueUsageInfo
.ReadableReference);
671
return SymbolUsageInfo.Create(
ValueUsageInfo
.Write);
684
return SymbolUsageInfo.Create(
ValueUsageInfo
.Name);
689
return SymbolUsageInfo.Create(
ValueUsageInfo
.Name);
720
var
valueUsageInfo =
ValueUsageInfo
.Read;
722
valueUsageInfo |=
ValueUsageInfo
.Write;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (31)
24
/// Returns the <see cref="
ValueUsageInfo
"/> for the given operation.
27
public static
ValueUsageInfo
GetValueUsageInfo(this IOperation operation, ISymbol containingSymbol)
56
return
ValueUsageInfo
.Write;
77
return
ValueUsageInfo
.Write;
88
return
ValueUsageInfo
.Write;
98
return
ValueUsageInfo
.Write;
106
return
ValueUsageInfo
.Write;
114
return
ValueUsageInfo
.Write;
120
return
ValueUsageInfo
.ReadWrite;
125
return
ValueUsageInfo
.Write;
132
?
ValueUsageInfo
.ReadWrite
133
:
ValueUsageInfo
.Write;
139
return
ValueUsageInfo
.ReadableWritableReference;
143
return
ValueUsageInfo
.ReadWrite;
151
~(
ValueUsageInfo
.Write |
ValueUsageInfo
.Reference);
157
return
ValueUsageInfo
.Name;
164
return
ValueUsageInfo
.ReadableReference;
167
return
ValueUsageInfo
.WritableReference;
170
return
ValueUsageInfo
.ReadableWritableReference;
173
return
ValueUsageInfo
.Read;
180
RefKind.RefReadOnly =>
ValueUsageInfo
.ReadableReference,
181
RefKind.Ref =>
ValueUsageInfo
.ReadableWritableReference,
182
_ =>
ValueUsageInfo
.Read,
194
return
ValueUsageInfo
.Read;
201
?
ValueUsageInfo
.ReadWrite
202
:
ValueUsageInfo
.Write;
210
return
ValueUsageInfo
.Write;
219
return
ValueUsageInfo
.ReadableWritableReference;
222
return
ValueUsageInfo
.ReadableReference;
227
return
ValueUsageInfo
.Read;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (5)
15
/// For methods, fields, properties, events, locals and parameters, this corresponds to values from <see cref="
ValueUsageInfo
"/>.
20
public static readonly SymbolUsageInfo None = Create(
ValueUsageInfo
.None);
23
public
ValueUsageInfo
? ValueUsageInfoOpt { get; }
29
public SymbolUsageInfo(
ValueUsageInfo
? valueUsageInfoOpt, TypeOrNamespaceUsageInfo? typeOrNamespaceUsageInfoOpt)
37
public static SymbolUsageInfo Create(
ValueUsageInfo
valueUsageInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ValueUsageInfo.cs (8)
69
public static bool IsReadFrom(this
ValueUsageInfo
valueUsageInfo)
70
=> (valueUsageInfo &
ValueUsageInfo
.Read) != 0;
72
public static bool IsWrittenTo(this
ValueUsageInfo
valueUsageInfo)
73
=> (valueUsageInfo &
ValueUsageInfo
.Write) != 0;
75
public static bool IsNameOnly(this
ValueUsageInfo
valueUsageInfo)
76
=> (valueUsageInfo &
ValueUsageInfo
.Name) != 0;
78
public static bool IsReference(this
ValueUsageInfo
valueUsageInfo)
79
=> (valueUsageInfo &
ValueUsageInfo
.Reference) != 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (5)
94
private void OnWriteReferenceFound(ISymbol symbol, IOperation operation,
ValueUsageInfo
valueUsageInfo)
97
var isRef = valueUsageInfo ==
ValueUsageInfo
.ReadableWritableReference;
112
var
valueUsageInfo = operation.GetValueUsageInfo(_currentContainingSymbol);
199
OnWriteReferenceFound(symbolOpt, write,
ValueUsageInfo
.Write);
275
OnWriteReferenceFound(operation.Symbol, operation,
ValueUsageInfo
.Write);