![]() |
LuciadCPillar C# 2024.0.02
|
Builder
that allows DataType
instances to be created.
More...
Public Member Functions | |
Builder (Luciad.Datamodels.DataType.Builder other) | |
Luciad.Datamodels.DataType.Builder | AddAnnotation (Luciad.Datamodels.DataAnnotation annotation) |
The annotation to add to the data type under construction. More... | |
Luciad.Datamodels.DataType.Builder | AddAnnotation (Luciad.Datamodels.IDataAnnotationFactory annotationFactory) |
Adds an annotation factory that is invoked when build is called. More... | |
Luciad.Datamodels.DataType.Builder | AddProperty (Luciad.Datamodels.DataProperty property) |
The property to add to the data type under construction. More... | |
Luciad.Datamodels.DataType | Build () |
Build the data type, including the properties and annotations that were added to this builder. More... | |
void | Dispose () |
Luciad.Datamodels.DataType.Builder | Name (string name) |
The name of the new data type. More... | |
Builder
that allows DataType
instances to be created.
Typical usage would be create a DataType.Builder
using DataType.NewBuilder
, specifying the data type's name. Then add the necessary DataProperty(s) and finally build()
the data type. The following snippet shows how this is done for a simple example data type:
|
inline |
|
inline |
The annotation to add to the data type under construction.
annotation | the annotation to add to the data type under construction. |
System.ArgumentNullException | when a null value is passed. |
|
inline |
Adds an annotation factory that is invoked when build is called.
The factory is provided with the type that is being built. This can be useful when the created annotation needs access to the type, for instance when the annotation requires a DataPropertyPath
.
An example usage is:
annotationFactory | the factory object. |
System.ArgumentNullException | when a null value is passed. |
|
inline |
The property to add to the data type under construction.
property | the property to add to the data type under construction. |
|
inline |
Build the data type, including the properties and annotations that were added to this builder.
After calling this function, this builder should no longer be used.
System.InvalidOperationException | If not all mandatory parameters are set. |
|
inline |
|
inline |
The name of the new data type.
Calling this function is mandatory.
name | name of the new data type. |