Class RefCounts
Utility class for dealing with reference counters.
Inherited Members
Namespace: SuperOffice.Data
Assembly: SoDataBase.dll
Syntax
public sealed class RefCounts
Methods
AllowBlank(RefCountsRow, FieldInfo)
Checks if the unique flag is set for the field.
Declaration
public static bool AllowBlank(RefCountsRow refCount, FieldInfo fieldInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| RefCountsRow | refCount | |
| FieldInfo | fieldInfo |
Returns
| Type | Description |
|---|---|
| bool |
AllowBlankAsync(FieldInfo, CancellationToken)
Checks if the unique flag is set for the field.
Declaration
public static Task<bool> AllowBlankAsync(FieldInfo fieldInfo, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | fieldInfo | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<bool> |
GetNextAsync(FieldInfo, int, CancellationToken)
Get the next number from a FieldInfo definition.
Declaration
public static Task<int> GetNextAsync(FieldInfo fieldInfo, int recordId = 0, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | fieldInfo | Field to get the next number for. |
| int | recordId | The record id to get the number for. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<int> | The next number for the field. |
Remarks
'0' is returned if there is no previous information about the row.
Unique(RefCountsRow, FieldInfo)
Checks if the unique flag is set for the field.
Declaration
public static bool Unique(RefCountsRow refCount, FieldInfo fieldInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| RefCountsRow | refCount | |
| FieldInfo | fieldInfo |
Returns
| Type | Description |
|---|---|
| bool |
UniqueAsync(FieldInfo, CancellationToken)
Checks if the unique flag is set for the field.
Declaration
public static Task<bool> UniqueAsync(FieldInfo fieldInfo, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | fieldInfo | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<bool> |