Skip to content

TransactionResult

Namespace: ThinkGeo.Core

This class represents the results of a transaction that was processed.

public class TransactionResult

Inheritance ObjectTransactionResult

Remarks:

This class holds the results of a transaction. It can tell the users the number of succeeded record and the number of failed records. It also has a dictionary that holds the individual reasons that certain records fails by FeatureId. If you are implementing this class it is important that you provide as much information about the transaction results to your users.

Properties

TotalSuccessCount

This property gets and sets the total number of records that we committed successfully.

public int TotalSuccessCount { get; set; }

Property Value

Int32

Remarks:

None

TotalFailureCount

This property gets and sets the total number of records that we committed unsuccessfully.

public int TotalFailureCount { get; set; }

Property Value

Int32

Remarks:

None

TransactionResultStatus

This property gets and sets the result status of the transaction.

public TransactionResultStatus TransactionResultStatus { get; set; }

Property Value

TransactionResultStatus

Remarks:

This property returns the results of the transaction. If all of the records committed fine then you get a success status. If any of the records fail then you get a failure status though some of the records may have committed.

FailureReasons

This property gets and sets the dictionary that contains the reasons for failure.

public Dictionary<string, string> FailureReasons { get; }

Property Value

Dictionary<String, String>

Remarks:

If there are failing records we suggest you add the failure reasons to this dictionary. It is also suggested that you use the FeatureId as the key of the Dictionary.

Constructors

TransactionResult()

This is the class constructor.

public TransactionResult()

Remarks:

This is the default constructor and is typically not used.

TransactionResult(Int32, Int32, Dictionary<String, String>, TransactionResultStatus)

This is the class constructor.

public TransactionResult(int totalSuccessCount, int totalFailureCount, Dictionary<string, string> failureReasons, TransactionResultStatus transactionResultStatus)

Parameters

totalSuccessCount Int32

totalFailureCount Int32

failureReasons Dictionary<String, String>

transactionResultStatus TransactionResultStatus

Remarks:

None.