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