Skip to main content

JsonRangeFloatAttribute

A class in Root.Township, Alta.Utilities.

JSON property attribute that clamps a float between a minimum and maximum whenever the property is read or written through Newtonsoft.

Constructors​

MemberWhat it is
JsonRangeFloatAttribute(float min, float max)Creates a JsonRangeFloatAttribute from min and max.

Fields​

2 private and internal fields
MemberWhat it is
private float maxThe upper limit.
private float minThe lower limit.

Methods​

MemberWhat it is
override IValueProvider Filter(IValueProvider baseProvider)Wraps the property's value provider in a JsonRangeFloatValueProvider.