|
| 1 | +--- |
| 2 | +layout: "page" |
| 3 | +title: "Bound Struct" |
| 4 | +bookmark: "Bound" |
| 5 | +permalink: "/api/JsonSchema.Net.DataGeneration/:title/" |
| 6 | +order: "10.07.000" |
| 7 | +--- |
| 8 | +**Namespace:** Json.Schema.DataGeneration |
| 9 | + |
| 10 | +**Inheritance:** |
| 11 | +`Bound` |
| 12 | + 🡒 |
| 13 | +`ValueType` |
| 14 | + 🡒 |
| 15 | +`object` |
| 16 | + |
| 17 | +**Implemented interfaces:** |
| 18 | + |
| 19 | +- IComparable\<Bound\> |
| 20 | +- IEquatable\<Bound\> |
| 21 | + |
| 22 | +Describes a lower or upper bound to a **Json.Schema.DataGeneration.NumberRange**. |
| 23 | + |
| 24 | +## Properties |
| 25 | + |
| 26 | +| Name | Type | Summary | |
| 27 | +|---|---|---| |
| 28 | +| **Inclusive** | bool | Gets whether the value is included in the bound. | |
| 29 | +| **Value** | decimal | Gets the bound value. | |
| 30 | + |
| 31 | +## Constructors |
| 32 | + |
| 33 | +### Bound(decimal value, bool inclusive) |
| 34 | + |
| 35 | +Creates a new **Json.Schema.DataGeneration.Bound**. |
| 36 | + |
| 37 | +#### Declaration |
| 38 | + |
| 39 | +```c# |
| 40 | +public Bound(decimal value, bool inclusive) |
| 41 | +``` |
| 42 | + |
| 43 | +| Parameter | Type | Description | |
| 44 | +|---|---|---| |
| 45 | +| value | decimal | The value | |
| 46 | +| inclusive | bool | Whether the value is included. Default is true. | |
| 47 | + |
| 48 | + |
| 49 | +## Methods |
| 50 | + |
| 51 | +### CompareTo(Bound other) |
| 52 | + |
| 53 | +Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances. |
| 54 | + |
| 55 | +#### Declaration |
| 56 | + |
| 57 | +```c# |
| 58 | +public int CompareTo(Bound other) |
| 59 | +``` |
| 60 | + |
| 61 | + |
| 62 | +#### Returns |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +### Complement(Bound b) |
| 67 | + |
| 68 | +Identifies the complement of a bound, which is the same value and inverted inclusivity. |
| 69 | + |
| 70 | +#### Declaration |
| 71 | + |
| 72 | +```c# |
| 73 | +public static Bound Complement(Bound b) |
| 74 | +``` |
| 75 | + |
| 76 | + |
| 77 | +#### Returns |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +### Equals(object obj) |
| 82 | + |
| 83 | +Indicates whether this instance and a specified object are equal. |
| 84 | + |
| 85 | +#### Declaration |
| 86 | + |
| 87 | +```c# |
| 88 | +public override bool Equals(object obj) |
| 89 | +``` |
| 90 | + |
| 91 | +| Parameter | Type | Description | |
| 92 | +|---|---|---| |
| 93 | +| obj | object | The object to compare with the current instance. | |
| 94 | + |
| 95 | + |
| 96 | +#### Returns |
| 97 | + |
| 98 | +true if <paramref name="obj">obj</paramref> and this instance are the same type and represent the same value; otherwise, false. |
| 99 | + |
| 100 | +### Equals(Bound other) |
| 101 | + |
| 102 | +Indicates whether the current object is equal to another object of the same type. |
| 103 | + |
| 104 | +#### Declaration |
| 105 | + |
| 106 | +```c# |
| 107 | +public bool Equals(Bound other) |
| 108 | +``` |
| 109 | + |
| 110 | +| Parameter | Type | Description | |
| 111 | +|---|---|---| |
| 112 | +| other | Bound | An object to compare with this object. | |
| 113 | + |
| 114 | + |
| 115 | +#### Returns |
| 116 | + |
| 117 | +true if the current object is equal to the <paramref name="other">other</paramref> parameter; otherwise, false. |
| 118 | + |
| 119 | +### GetHashCode() |
| 120 | + |
| 121 | +Returns the hash code for this instance. |
| 122 | + |
| 123 | +#### Declaration |
| 124 | + |
| 125 | +```c# |
| 126 | +public override int GetHashCode() |
| 127 | +``` |
| 128 | + |
| 129 | + |
| 130 | +#### Returns |
| 131 | + |
| 132 | +A 32-bit signed integer that is the hash code for this instance. |
| 133 | + |
| 134 | +### Maximum(Bound a, Bound b) |
| 135 | + |
| 136 | +Identifies the maximum of two bounds, including their inclusivity. |
| 137 | + |
| 138 | +#### Declaration |
| 139 | + |
| 140 | +```c# |
| 141 | +public static Bound Maximum(Bound a, Bound b) |
| 142 | +``` |
| 143 | + |
| 144 | + |
| 145 | +#### Returns |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +### Minimum(Bound a, Bound b) |
| 150 | + |
| 151 | +Identifies the minimum of two bounds, including their inclusivity. |
| 152 | + |
| 153 | +#### Declaration |
| 154 | + |
| 155 | +```c# |
| 156 | +public static Bound Minimum(Bound a, Bound b) |
| 157 | +``` |
| 158 | + |
| 159 | + |
| 160 | +#### Returns |
| 161 | + |
| 162 | + |
| 163 | + |
0 commit comments