Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/FormulaParsing/Utilities/IntegerIdProvider.cs @ 18191

Last change on this file since 18191 was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 510 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace 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.