Table of Contents

Class OperatorFactDto

Namespace
RDCore.SDK.Platform.Protocol
Assembly
RDCore.SDK.dll

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

Node SyntaxNodeId

The syntax node the operation is evaluated for.

Location SourceLocation

Where the operation is.

Operator string

The operator: one of the Tokens operators, or Tokens.MemberAccess / Tokens.DictionaryAccess for a member access.

EffectiveType string

The name of the effective type of the operation, or of the declared type of the member that is accessed, when it has one.

IsValueKnown bool

Whether every operand is known (the object, for a member access), as opposed to a value its type merely allows.

ArithmeticOpSemanticFlags ArithmeticOperatorSemanticFlags?

What is known about an arithmetic operation (ArithmeticOperatorFact).

ConcatOpSemanticFlags ConcatOperationSemanticFlags?

What is known about a concatenation (ConcatOperatorFact).

ComparisonOpSemanticFlags ComparisonOperatorSemanticFlags?

What is known about a comparison (ComparisonOperatorFact).

LogicalOpSemanticFlags LogicalOperatorSemanticFlags?

What is known about a logical operation (LogicalOperatorFact).

MemberAccessOpSemanticFlags MemberAccessOperationSemanticFlags?

What is known about a member access (MemberAccessFact).

Error RuntimeErrorDto

The run-time error the operation raises, when it is guaranteed to.

Comparison OptionCompare?

How a comparison compares String values where it is evaluated (Option Compare); null for any other operation.

ComparisonCulture string

The name of the culture a Text comparison compares with, when it is not the invariant one.

Member string

The 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

ArithmeticOperatorSemanticFlags?

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

OptionCompare?

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

string

ComparisonOpSemanticFlags

What is known about a comparison (ComparisonOperatorFact).

public ComparisonOperatorSemanticFlags? ComparisonOpSemanticFlags { get; init; }

Property Value

ComparisonOperatorSemanticFlags?

ConcatOpSemanticFlags

What is known about a concatenation (ConcatOperatorFact).

public ConcatOperationSemanticFlags? ConcatOpSemanticFlags { get; init; }

Property Value

ConcatOperationSemanticFlags?

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

string

Error

The run-time error the operation raises, when it is guaranteed to.

public RuntimeErrorDto? Error { get; init; }

Property Value

RuntimeErrorDto

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

bool

Location

Where the operation is.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

LogicalOpSemanticFlags

What is known about a logical operation (LogicalOperatorFact).

public LogicalOperatorSemanticFlags? LogicalOpSemanticFlags { get; init; }

Property Value

LogicalOperatorSemanticFlags?

Member

The name of the member that is accessed, when it is known (Member).

public string? Member { get; init; }

Property Value

string

MemberAccessOpSemanticFlags

What is known about a member access (MemberAccessFact).

public MemberAccessOperationSemanticFlags? MemberAccessOpSemanticFlags { get; init; }

Property Value

MemberAccessOperationSemanticFlags?

Node

The syntax node the operation is evaluated for.

public SyntaxNodeId Node { get; init; }

Property Value

SyntaxNodeId

Operator

The operator: one of the Tokens operators, or Tokens.MemberAccess / Tokens.DictionaryAccess for a member access.

public string Operator { get; init; }

Property Value

string

Methods

From(OperatorFact)

Describes an operation for the wire.

public static OperatorFactDto From(OperatorFact fact)

Parameters

fact OperatorFact

The operation.

Returns

OperatorFactDto