Numbering |
Exception | Condition |
---|---|
ArgumentException | The sequence partition does not exist in the schema. -or- The specified sequence does not contain any elements with the given fromNumber. -or- There already are elements with the given toNumber in the specified sequence. |
ArgumentNullException | A non-optional argument was null |
ArgumentOutOfRangeException | The value of toNumber must be in the range from 1 to the maximum value for an Integer type |
InvalidOperationException | Either the schema or its document cannot be modified at present. |
This method gives the caller the ability to overwrite any number used in a given numbering sequence as long as the new number does not exist in the same sequence yet. If an attempt is made to replace a number by another that already exists, an exception will be thrown.
The new number will automatically be applied to all elements that bear the original number, thus those elements must be free to be modified. A collection of element Ids of all the affected elements is returned by this method.
The method is independent of the sequence's current starting number that might have been assigned previously, meaning that the new number will be accepted even if it is lower than the previously set start number in the sequence.