Skip to main content Link Search Menu Expand Document (external link)



RequiredPropertyAttribute Class

Add this attribute to any property on any subclass of MapComponent, and if the user
forgets to set that property, this will throw a MissingRequiredChildElementException
or MissingRequiredOptionsChildElementException. This works for both [Parameter]
properties as well as Child Components registered with RegisterChildComponent

public class RequiredPropertyAttribute : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 RequiredPropertyAttribute


RequiredPropertyAttribute(string[]) Constructor

public RequiredPropertyAttribute(params string[]? otherOptions);


otherOptions System.String[]

If there are two or more acceptable properties that can be set, add the other property names
here for the validation. Use nameof(Property) to ensure you get the right name.


RequiredPropertyAttribute.OtherOptions Property

The other potential properties that can replace this property.

public string[]? OtherOptions { get; }

Property Value