Open sandboxFocus

Interface INotNullExpressionBuilder

An IExpressionBuilder that is guaranteed to produce a non-null expression value.

Namespace: Metalama.Framework.Code.SyntaxBuilders
Assembly: Metalama.Framework.dll
Syntax
public interface INotNullExpressionBuilder : IExpressionBuilder
Remarks

This interface is a specialization of IExpressionBuilder that indicates the builder will always produce a non-null result. This allows the ToValue(INotNullExpressionBuilder) extension method to return a non-nullable dynamic instead of dynamic?.

Builders like ArrayBuilder and InterpolatedStringBuilder implement this interface because they always produce valid, non-null expressions (arrays and interpolated strings are never null).

Extension Methods

See Also