Table of Contents

Class CteAnnotationsContainer

Namespace
LinqToDB.Internal.Linq.Builder
Assembly
linq2db.dll

Immutable carrier for the state produced by the ICteBuilder callback. Placed into the query expression tree as a single constant so linq2db's query-cache equality comparer can discriminate distinct AsCte(b => ...) configurations: reference-equal delegate values would otherwise collapse to the same cache entry. The constructor snapshots the caller's annotation bag into an internally-owned store, so post-call mutations of the source Annotatable cannot affect translation or cache keying.

public sealed class CteAnnotationsContainer : IExpressionCacheKey, IEquatable<CteAnnotationsContainer>
Inheritance
object
CteAnnotationsContainer
Implements
Extension Methods

Constructors

CteAnnotationsContainer(string?, IEnumerable<IAnnotation>?)

public CteAnnotationsContainer(string? name, IEnumerable<IAnnotation>? annotations)

Parameters

name string
annotations IEnumerable<IAnnotation>

Properties

Annotations

public IReadOnlyAnnotatable Annotations { get; }

Property Value

IReadOnlyAnnotatable

Name

public string? Name { get; }

Property Value

string

Methods

Equals(CteAnnotationsContainer?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CteAnnotationsContainer? other)

Parameters

other CteAnnotationsContainer

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.