Page 14: Optional Elements |
Imagine that only some of the sources contained a Fader node. With the current database types ConsumerTRootCreateAsync would throw an exception for the first source that does not contain a Fader node. To avoid this, elements can be declared optional:
private sealed class OptionalFaderSource : FieldNode<OptionalFaderSource> { [Element(IsOptional = true)] internal Fader Fader { get; private set; } [Element(Identifier = "DSP")] internal Dsp Dsp { get; private set; } }
Proceed to Page 15: Nullable Parameters.