Class UnaryOperationPtg
This class represents all unary operations.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
[Token]
[Token]
[Token]
public class UnaryOperationPtg : OperationPtg, ICloneable
Constructors
UnaryOperationPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public UnaryOperationPtg()
UnaryOperationPtg(DataProvider, Int32, ExcelVersion)
Creates unary operation from the data array and offset of the first byte in it.
Declaration
public UnaryOperationPtg(DataProvider provider, int offset, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | offset | Offset to the token data. |
ExcelVersion | version | Excel version that was used to infill data provider. |
UnaryOperationPtg(String)
Constructs unary operation token by its string representation.
Declaration
public UnaryOperationPtg(string strOperationSymbol)
Parameters
Type | Name | Description |
---|---|---|
System.String | strOperationSymbol | String representation of the operation that will be created. |
Properties
Attributes
Array of all token attributes applied to the object. This property is used to increase performance.
Declaration
protected override TokenAttribute[] Attributes { get; }
Property Value
Type |
---|
TokenAttribute[] |
Overrides
OperationType
Read-only. Type of operation.
Declaration
public override TOperation OperationType { get; }
Property Value
Type |
---|
TOperation |
Overrides
Methods
GetOperands(String, ref Int32, FormulaUtil)
Returns array of operands.
Declaration
public override string[] GetOperands(string strFormula, ref int index, FormulaUtil formulaParser)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | Formula string. |
System.Int32 | index | Index of unary operation in the formula string. |
FormulaUtil | formulaParser | Formula parser. |
Returns
Type | Description |
---|---|
System.String[] | Array of strings that contain unary operation operands. |
Overrides
GetSize(ExcelVersion)
Read-only. Size of the token.
Declaration
public override int GetSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type |
---|
System.Int32 |
Overrides
GetTokenId(String)
Gets token code using unary operation string representation.
Declaration
public static FormulaToken GetTokenId(string operationSign)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationSign | String representation of the unary operation. |
Returns
Type | Description |
---|---|
FormulaToken | Token code. |
PushResultToStack(FormulaUtil, Stack<Object>, Boolean)
Takes all needed operands from the stack and pushes the result of the operation.
Declaration
public override void PushResultToStack(FormulaUtil formulaUtil, Stack<object> operands, bool isForSerialization)
Parameters
Type | Name | Description |
---|---|---|
FormulaUtil | formulaUtil | Object used for formula parsing. |
System.Collections.Generic.Stack<System.Object> | operands | Stack that contains all operands and will receive the result of the operation. |
System.Boolean | isForSerialization |
Overrides
ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean)
Converts token to a string.
Declaration
public override string ToString(FormulaUtil formulaUtil, int iRow, int iColumn, bool bR1C1, NumberFormatInfo numberFormat, bool isForSerialization)
Parameters
Type | Name | Description |
---|---|---|
FormulaUtil | formulaUtil | Formula util. |
System.Int32 | iRow | Zero-based row index of the cell that contains this token. |
System.Int32 | iColumn | Zero-based row index of the cell that contains this token. |
System.Boolean | bR1C1 | Indicates whether R1C1 notation should be used. |
System.Globalization.NumberFormatInfo | numberFormat | |
System.Boolean | isForSerialization |
Returns
Type | Description |
---|---|
System.String | String representation of this token. |