dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Attributes
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
Constructors
RequiredPropertyAttribute(string[]) Constructor
public RequiredPropertyAttribute(params string[]? otherOptions);
Parameters
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.
Properties
RequiredPropertyAttribute.OtherOptions Property
The other potential properties that can replace this property.
public string[]? OtherOptions { get; }