Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using OfficeOpenXml.FormulaParsing.ExcelUtilities;
|
---|
6 |
|
---|
7 | namespace OfficeOpenXml.FormulaParsing
|
---|
8 | {
|
---|
9 | /// <summary>
|
---|
10 | /// Represents a parsing of a single input or workbook addrses.
|
---|
11 | /// </summary>
|
---|
12 | public class ParsingScope : IDisposable
|
---|
13 | {
|
---|
14 | private readonly ParsingScopes _parsingScopes;
|
---|
15 |
|
---|
16 | public ParsingScope(ParsingScopes parsingScopes, RangeAddress address)
|
---|
17 | : this(parsingScopes, null, address)
|
---|
18 | {
|
---|
19 | }
|
---|
20 |
|
---|
21 | public ParsingScope(ParsingScopes parsingScopes, ParsingScope parent, RangeAddress address)
|
---|
22 | {
|
---|
23 | _parsingScopes = parsingScopes;
|
---|
24 | Parent = parent;
|
---|
25 | Address = address;
|
---|
26 | ScopeId = Guid.NewGuid();
|
---|
27 | }
|
---|
28 |
|
---|
29 | /// <summary>
|
---|
30 | /// Id of the scope.
|
---|
31 | /// </summary>
|
---|
32 | public Guid ScopeId { get; private set; }
|
---|
33 |
|
---|
34 | /// <summary>
|
---|
35 | /// The calling scope.
|
---|
36 | /// </summary>
|
---|
37 | public ParsingScope Parent { get; private set; }
|
---|
38 |
|
---|
39 | /// <summary>
|
---|
40 | /// The address of the cell currently beeing parsed.
|
---|
41 | /// </summary>
|
---|
42 | public RangeAddress Address { get; private set; }
|
---|
43 |
|
---|
44 | /// <summary>
|
---|
45 | /// True if the current scope is a Subtotal function beeing executed.
|
---|
46 | /// </summary>
|
---|
47 | public bool IsSubtotal { get; set; }
|
---|
48 |
|
---|
49 | public void Dispose()
|
---|
50 | {
|
---|
51 | _parsingScopes.KillScope(this);
|
---|
52 | }
|
---|
53 | }
|
---|
54 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.