Class DataStoreIntegrationClient
- Namespace
- Sfrep.AppraiseIt.Client.Integration.DataStore
- Assembly
- Sfrep.AppraiseIt.Client.Integration.dll
Provides access to the data store that manages report data on dynamic forms.
public sealed class DataStoreIntegrationClient : DataStoreIntegrationClientBase, IDisposable
- Inheritance
-
objectDataStoreIntegrationClient
- Implements
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
Properties
CompTypes
Gets the list of comparable types that are available on dynamic forms.
public IReadOnlyList<string> CompTypes { get; }
Property Value
- IReadOnlyList<string>
The list of comparable types that are available on dynamic forms.
Methods
AddComp(string)
Adds a comparable of the specified type.
public FieldsContainerIntegrationClientBase AddComp(string compType)
Parameters
compTypestringThe comparable type to add.
Returns
- FieldsContainerIntegrationClientBase
The new comparable.
If compType is RentalComparables, an instance of RentalFieldsContainerIntegrationClient is returned. An instance of PropertyFieldsContainerIntegrationClient is returned for all other CompTypes.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
ClearComp(string, int, bool)
Clears the specified comparable.
public void ClearComp(string compType, int compIndex, bool clearImages = true)
Parameters
compTypestringThe comparable type.
compIndexintThe 0-based comparable index.
clearImagesboolTrue if and only if the comparables images should also be cleared.
Note that images and image list fields that occur in repeatable row groups will always be cleared.
Dispose(bool)
Frees all resources used by this instance.
protected override void Dispose(bool disposing)
Parameters
disposingboolTrue if called by the Dispose() method. False if called by the finalizer.
GetComp(string, int)
Gets the comparable at the specified index.
public FieldsContainerIntegrationClientBase GetComp(string compType, int compIndex)
Parameters
compTypestringThe comparable type.
compIndexintThe 0-based comparable index.
Returns
- FieldsContainerIntegrationClientBase
The comparable at the specified index.
If compType is RentalComparables, an instance of RentalFieldsContainerIntegrationClient is returned. An instance of PropertyFieldsContainerIntegrationClient is returned for all other CompTypes.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
GetCompCount(string)
Gets the number of comparables of the specified type on dynamic forms.
public int GetCompCount(string compType)
Parameters
compTypestringThe comparable type.
Returns
- int
The number of comparables of the specified type on dynamic forms.
GetImageData(int)
Gets the image data having the specified ID.
public ImageDataIntegrationClient GetImageData(int id)
Parameters
idintThe image ID.
Returns
- ImageDataIntegrationClient
The image data, if it exists. If the image data does not exist, null is returned.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
GetReportFields()
Gets general report and subject data used by dynamic forms.
public PropertyFieldsContainerIntegrationClient GetReportFields()
Returns
- PropertyFieldsContainerIntegrationClient
The general report and subject data used by dynamic forms.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
HasCompType(string)
Checks if the specified comparable type is available on dynamic forms.
public bool HasCompType(string compType)
Parameters
compTypestringThe comparable type.
Returns
- bool
True if and only if the comparable type is available on dynamic forms.
ImageDataIsUsed(ImageDataIntegrationClient)
Checks if the specified image data is used by an image fields or image list fields in the report.
public bool ImageDataIsUsed(ImageDataIntegrationClient imageData)
Parameters
imageDataImageDataIntegrationClientThe image data.
Returns
- bool
True if and only if the specified image data is used by any fields.
LoadImageDataAsync(byte[], string, CancellationToken)
Asynchronously loads the specified image data.
public Task<ImageDataIntegrationClient> LoadImageDataAsync(byte[] data, string fileExtension, CancellationToken cancelToken = default)
Parameters
databyte[]The image file data.
fileExtensionstringThe image file's extension, with the leading period.
cancelTokenCancellationTokenA CancellationToken that can be used to cancel this operation.
Returns
- Task<ImageDataIntegrationClient>
The loaded image data.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
LoadImageFileAsync(string, CancellationToken)
Asynchronously loads the image data from the specified file.
public Task<ImageDataIntegrationClient> LoadImageFileAsync(string filePath, CancellationToken cancelToken = default)
Parameters
filePathstringThe path to the image file to load.
cancelTokenCancellationTokenA CancellationToken that can be used to cancel this operation.
Returns
- Task<ImageDataIntegrationClient>
The loaded image data.
Remarks
Each call returns a new instance that, to prevent resource leaks, must be disposed by calling the Dispose method once it is no longer needed.
MoveComp(string, int, int)
Moves the specified comparable.
public void MoveComp(string compType, int sourceCompIndex, int destinationCompIndex)
Parameters
compTypestringThe comparable type.
sourceCompIndexintThe 0-based source comparable index.
destinationCompIndexintThe 0-based destination comparable index.
RemoveComp(string, int)
Removes the specified comparable.
public void RemoveComp(string compType, int compIndex)
Parameters
compTypestringThe comparable type.
compIndexintThe 0-based comparable index.
TryRemoveImageData(ImageDataIntegrationClient)
Removes the specified image data from the report data store.
public bool TryRemoveImageData(ImageDataIntegrationClient imageData)
Parameters
imageDataImageDataIntegrationClientThe image data to remove.
Returns
- bool
True if and only if the image data was successfully removed. False if the image data could not be removed because it is currently used by an image field or image list field.