Class OperatorFactDto
An OperatorFact, as it travels: an operation of an operator, or the access of a member (MemberAccessFact).
public record OperatorFactDto : IEquatable<OperatorFactDto>
- Inheritance
-
OperatorFactDto
- Implements
- Inherited Members
Remarks
👉 One record carries every family: the flags of the family the operation belongs to are set, and those of every other family are null.
Constructors
OperatorFactDto(SyntaxNodeId, SourceLocation, string, string?, bool, ArithmeticOperatorSemanticFlags?, ConcatOperationSemanticFlags?, ComparisonOperatorSemanticFlags?, LogicalOperatorSemanticFlags?, MemberAccessOperationSemanticFlags?, RuntimeErrorDto?, OptionCompare?, string?, string?)
An OperatorFact, as it travels: an operation of an operator, or the access of a member (MemberAccessFact).
public OperatorFactDto(SyntaxNodeId Node, SourceLocation Location, string Operator, string? EffectiveType, bool IsValueKnown, ArithmeticOperatorSemanticFlags? ArithmeticOpSemanticFlags, ConcatOperationSemanticFlags? ConcatOpSemanticFlags, ComparisonOperatorSemanticFlags? ComparisonOpSemanticFlags, LogicalOperatorSemanticFlags? LogicalOpSemanticFlags, MemberAccessOperationSemanticFlags? MemberAccessOpSemanticFlags, RuntimeErrorDto? Error, OptionCompare? Comparison = null, string? ComparisonCulture = null, string? Member = null)
Parameters
NodeSyntaxNodeIdThe syntax node the operation is evaluated for.
LocationSourceLocationWhere the operation is.
OperatorstringThe operator: one of the
Tokensoperators, orTokens.MemberAccess/Tokens.DictionaryAccessfor a member access.EffectiveTypestringThe name of the effective type of the operation, or of the declared type of the member that is accessed, when it has one.
IsValueKnownboolWhether every operand is known (the object, for a member access), as opposed to a value its type merely allows.
ArithmeticOpSemanticFlagsArithmeticOperatorSemanticFlags?What is known about an arithmetic operation (ArithmeticOperatorFact).
ConcatOpSemanticFlagsConcatOperationSemanticFlags?What is known about a concatenation (ConcatOperatorFact).
ComparisonOpSemanticFlagsComparisonOperatorSemanticFlags?What is known about a comparison (ComparisonOperatorFact).
LogicalOpSemanticFlagsLogicalOperatorSemanticFlags?What is known about a logical operation (LogicalOperatorFact).
MemberAccessOpSemanticFlagsMemberAccessOperationSemanticFlags?What is known about a member access (MemberAccessFact).
ErrorRuntimeErrorDtoThe run-time error the operation raises, when it is guaranteed to.
ComparisonOptionCompare?How a comparison compares
Stringvalues where it is evaluated (Option Compare); null for any other operation.ComparisonCulturestringThe name of the culture a
Textcomparison compares with, when it is not the invariant one.MemberstringThe name of the member that is accessed, when it is known (Member).
Remarks
👉 One record carries every family: the flags of the family the operation belongs to are set, and those of every other family are null.
Properties
ArithmeticOpSemanticFlags
What is known about an arithmetic operation (ArithmeticOperatorFact).
public ArithmeticOperatorSemanticFlags? ArithmeticOpSemanticFlags { get; init; }
Property Value
Comparison
How a comparison compares String values where it is evaluated (Option Compare); null for any other operation.
public OptionCompare? Comparison { get; init; }
Property Value
ComparisonCulture
The name of the culture a Text comparison compares with, when it is not the invariant one.
public string? ComparisonCulture { get; init; }
Property Value
ComparisonOpSemanticFlags
What is known about a comparison (ComparisonOperatorFact).
public ComparisonOperatorSemanticFlags? ComparisonOpSemanticFlags { get; init; }
Property Value
ConcatOpSemanticFlags
What is known about a concatenation (ConcatOperatorFact).
public ConcatOperationSemanticFlags? ConcatOpSemanticFlags { get; init; }
Property Value
EffectiveType
The name of the effective type of the operation, or of the declared type of the member that is accessed, when it has one.
public string? EffectiveType { get; init; }
Property Value
Error
The run-time error the operation raises, when it is guaranteed to.
public RuntimeErrorDto? Error { get; init; }
Property Value
IsValueKnown
Whether every operand is known (the object, for a member access), as opposed to a value its type merely allows.
public bool IsValueKnown { get; init; }
Property Value
Location
Where the operation is.
public SourceLocation Location { get; init; }
Property Value
LogicalOpSemanticFlags
What is known about a logical operation (LogicalOperatorFact).
public LogicalOperatorSemanticFlags? LogicalOpSemanticFlags { get; init; }
Property Value
Member
The name of the member that is accessed, when it is known (Member).
public string? Member { get; init; }
Property Value
MemberAccessOpSemanticFlags
What is known about a member access (MemberAccessFact).
public MemberAccessOperationSemanticFlags? MemberAccessOpSemanticFlags { get; init; }
Property Value
Node
The syntax node the operation is evaluated for.
public SyntaxNodeId Node { get; init; }
Property Value
Operator
The operator: one of the Tokens operators, or Tokens.MemberAccess / Tokens.DictionaryAccess for a member access.
public string Operator { get; init; }
Property Value
Methods
From(OperatorFact)
Describes an operation for the wire.
public static OperatorFactDto From(OperatorFact fact)
Parameters
factOperatorFactThe operation.