source:
trunk/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/FormulaParsing/Utilities/IntegerIdProvider.cs
@
15682
Last change on this file since 15682 was 12074, checked in by sraggl, 10 years ago | |
---|---|
File size: 510 bytes |
Line | |
---|---|
1 | using System; |
2 | using System.Collections.Generic; |
3 | using System.Linq; |
4 | using System.Text; |
5 | |
6 | namespace OfficeOpenXml.FormulaParsing.Utilities |
7 | { |
8 | public class IntegerIdProvider : IdProvider |
9 | { |
10 | private int _lastId = int.MinValue; |
11 | |
12 | public override object NewId() |
13 | { |
14 | if (_lastId >= int.MaxValue) |
15 | { |
16 | throw new InvalidOperationException("IdProvider run out of id:s"); |
17 | } |
18 | return _lastId++; |
19 | } |
20 | } |
21 | } |
Note: See TracBrowser
for help on using the repository browser.