Show / Hide Table of Contents

Class ExpressionExtensions

Class implementing the necessary infrastructure to use IExpressionMetadata.

Inheritance
Object
ExpressionExtensions
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Mangrove.MetricSetSyntaxTree.ExpressionMetadata
Assembly: MetricSetSyntaxTree.dll
Syntax
public static class ExpressionExtensions
Remarks

For more details about this see this RFC.

Methods

View Source

HasMetadata<T>(ColumnReference)

Check fIf cr contains a metadata of type implementing IExpressionMetadata.

Declaration
public static bool HasMetadata<T>(this ColumnReference cr)
    where T : class, IExpressionMetadata
Parameters
Type Name Description
ColumnReference cr
Returns
Type Description
Boolean
Type Parameters
Name Description
T
View Source

RemoveMetadata<T>(ColumnReference)

This method removes metadata from the ColumnReference provided if the metadata is present.

Declaration
public static ColumnReference RemoveMetadata<T>(this ColumnReference cr)
    where T : class, IExpressionMetadata
Parameters
Type Name Description
ColumnReference cr
Returns
Type Description
ColumnReference
Type Parameters
Name Description
T
View Source

RevertName(ColumnReference)

Using PreserveNameMetadata, rename cr to the name speficied in that metadata. If PreserveNameMetadata is not present, just return cr back.

Declaration
public static ColumnReference RevertName(this ColumnReference cr)
Parameters
Type Name Description
ColumnReference cr
Returns
Type Description
ColumnReference
View Source

TryGetMetadata<T>(ColumnReference, out T)

If cr contains a metadata of type implementing IExpressionMetadata, return true and parse the metadata into metadata.

Declaration
public static bool TryGetMetadata<T>(this ColumnReference cr, out T metadata)
    where T : class, IExpressionMetadata
Parameters
Type Name Description
ColumnReference cr
T metadata
Returns
Type Description
Boolean
Type Parameters
Name Description
T
View Source

WithMetadata<T>(ColumnReference, T)

Add to the . If already contains metadata of type , the value will be overwritten with the newly provided .

Declaration
public static ColumnReference WithMetadata<T>(this ColumnReference cr, T metadata)
    where T : class, IExpressionMetadata
Parameters
Type Name Description
ColumnReference cr
T metadata
Returns
Type Description
ColumnReference
Type Parameters
Name Description
T
  • View Source
Back to top Generated by DocFX