Class CteAnnotationsContainer
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
-
objectCteAnnotationsContainer
- Implements
- Extension Methods
Constructors
CteAnnotationsContainer(string?, IEnumerable<IAnnotation>?)
public CteAnnotationsContainer(string? name, IEnumerable<IAnnotation>? annotations)
Parameters
namestringannotationsIEnumerable<IAnnotation>
Properties
Annotations
public IReadOnlyAnnotatable Annotations { get; }
Property Value
Name
public string? Name { get; }
Property Value
Methods
Equals(CteAnnotationsContainer?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CteAnnotationsContainer? other)
Parameters
otherCteAnnotationsContainerAn object to compare with this object.
Returns
- bool
true if the current object is equal to the
otherparameter; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe 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.