Table of Contents

Interface ILabelSyntax<T, TSyntax>

Namespace
NMF.Glsp.Language
Assembly
NMF.Glsp.dll

Denotes an interface for a syntax to customize labels

public interface ILabelSyntax<T, TSyntax>

Type Parameters

T

The semantic type of elements for which a label is created

TSyntax

The syntax type

Extension Methods

Methods

If(Expression<Func<T, bool>>)

Adds a condition for when the label is generated

TSyntax If(Expression<Func<T, bool>> guard)

Parameters

guard Expression<Func<T, bool>>

A function expression expressing a guard condition

Returns

TSyntax

A label syntax element for chaining purposes

Validate(Func<T, string, ValidationStatus>)

Registers a function to validate the label value

TSyntax Validate(Func<T, string, ValidationStatus> validator)

Parameters

validator Func<T, string, ValidationStatus>

A function that validates inputs

Returns

TSyntax

A label syntax element for chaining purposes

WithSetter(Action<T, string>)

Overrides the setter of the label

TSyntax WithSetter(Action<T, string> setter)

Parameters

setter Action<T, string>

A setter function or null to make the label readonly

Returns

TSyntax

A label syntax element for chaining purposes

WithType(string)

Overrides the GLSP type created for the label

TSyntax WithType(string type)

Parameters

type string

The GLSP type for the label

Returns

TSyntax

A label syntax element for chaining purposes