NanoXLSX.Core 3.0.0-rc.3
Loading...
Searching...
No Matches
NanoXLSX.Utils.Comparators Class Reference

Class providing general comparator methods. More...

Static Public Member Functions

static bool CompareSecureStrings (SecureString value1, SecureString value2)
 Compares whether the content of two SecureString instances are equal. The comparison method tries to handle the operation as secure as possible.
static int CompareDimensions (float? dimension1, float? dimension2)
 Compares two dimensions (e.g. column width, column height).

Detailed Description

Class providing general comparator methods.

Definition at line 10 of file Comparators.cs.

Member Function Documentation

◆ CompareDimensions()

int NanoXLSX.Utils.Comparators.CompareDimensions ( float? dimension1,
float? dimension2 )
static

Compares two dimensions (e.g. column width, column height).

Parameters
dimension1Nullable dimension 1
dimension2Nullable dimension 2
Returns
1, if dimension1 is greater than dimension2, -1 if dimension1 is smaller than dimension2, 0 if both values are equal
Remarks
If dimension1 is null, -1 will be returned, if dimension2 is null, 1 will be returned. For the equality, a threshold value will be used

Definition at line 82 of file Comparators.cs.

◆ CompareSecureStrings()

bool NanoXLSX.Utils.Comparators.CompareSecureStrings ( SecureString value1,
SecureString value2 )
static

Compares whether the content of two SecureString instances are equal. The comparison method tries to handle the operation as secure as possible.

Parameters
value1SecureString instance one
value2SecureString instance two
Returns
True, if the content of the two instance is equal, otherwise false

Definition at line 24 of file Comparators.cs.


The documentation for this class was generated from the following file: